Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
189
rated 0 times [  196] [ 7]  / answers: 1 / hits: 24022  / 9 Years ago, wed, june 3, 2015, 12:00:00

I can't solve this problem where the console gives this error: Uncaught TypeError: $ is not a function. This is the code it points to:



<script type=text/javascript>
$(document).ready(function() {
$(.linky).click(function(){
var t = $(this); //<-ERROR POINTS HERE
var y = $(#0+t.attr(id)).offset().top;
$('html,body').animate({scrollTop: y},500);
});
});
</script>


Any help would be much appreciated!


More From » jquery

 Answers
5

You need to include the jquery script



<script src=https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js></script>

[#66339] Tuesday, June 2, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
draven

Total Points: 641
Total Questions: 101
Total Answers: 110

Location: Nicaragua
Member since Mon, Sep 26, 2022
2 Years ago
draven questions
Tue, Apr 12, 22, 00:00, 2 Years ago
Thu, Feb 17, 22, 00:00, 2 Years ago
Tue, Nov 30, 21, 00:00, 3 Years ago
Tue, Oct 19, 21, 00:00, 3 Years ago
;