Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-23-2011, 01:11 AM   PM User | #1
pabozich
New to the CF scene

 
Join Date: Oct 2011
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
pabozich is an unknown quantity at this point
$ is not a function error

Complete coding novice here, but I'm getting this error twice on my site (insidethehall.com) in Firebug. Appears to be lines 175 and 712 in the code.

Noticed this because the tabbed sections in my right sidebar have completely stopped working and I just get javascript:void(0) when I try to click them. For example, under resources section in right sidebar, try clicking "Blogroll" or "Big Ten."

Any help or suggestions would be appreciated. Thanks.
pabozich is offline   Reply With Quote
Old 10-23-2011, 01:21 AM   PM User | #2
jmrker
Senior Coder

 
jmrker's Avatar
 
Join Date: Aug 2006
Location: FL
Posts: 2,764
Thanks: 29
Thanked 453 Times in 447 Posts
jmrker will become famous soon enough
Without seeing any of your code, which you have not decided to post,
my SWAG is that you are trying to use a JQuery function without
having the JQuery library loaded and available.
jmrker is offline   Reply With Quote
Users who have thanked jmrker for this post:
pabozich (10-23-2011)
Old 10-23-2011, 01:29 AM   PM User | #3
pabozich
New to the CF scene

 
Join Date: Oct 2011
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
pabozich is an unknown quantity at this point
Quote:
Originally Posted by jmrker View Post
Without seeing any of your code, which you have not decided to post,
my SWAG is that you are trying to use a JQuery function without
having the JQuery library loaded and available.
Here's are the code snippets it points me to in reference to the error:

Code:
<script type="text/javascript">
$('#searchform span.mag').click(function(e) {
$('#searchform').submit();
});
</script>
and

Code:
<script type="text/javascript">
$(function() {
$('.tabbedContainer .tabs li:first-child a').addClass('active');
//$('.tabbedContainer .tab-content:first-child').css('display','block');
$('.tabbedContainer .tabs li a').click(function(e) {
e.preventDefault();
var idPieces = $(this).attr('id').split('a-');
var parentClass = $(this).parent().attr('class');
/* console.log(idPieces[1]);
console.log('hidding: ' + parentClass + '-container'); */
$('#' + parentClass + '-container .tab-content:visible').css('display','none');
$('#' + idPieces[1]).css('display','block');
$('#' + parentClass + '-container .tabs li a.active').removeClass('active');
$(this).addClass('active');
});
$('.tabbedContainer .tabs li a#a-tab-crean').unbind().click(function(e) {
$.getJSON(
'http://twitter.com/statuses/user_timeline/tomcrean.json?callback=twitterCallback2&count=5',
twitterCallback2
);
});
});
</script>
pabozich is offline   Reply With Quote
Old 10-23-2011, 02:18 AM   PM User | #4
jmrker
Senior Coder

 
jmrker's Avatar
 
Join Date: Aug 2006
Location: FL
Posts: 2,764
Thanks: 29
Thanked 453 Times in 447 Posts
jmrker will become famous soon enough
I personally know very little about JQuery, if that is indeed the code your are using.

However there is another area of this forum, "Javascript Frameworks", where you
might receive a more complete answer to your question.
See: http://www.codingforums.com/forumdisplay.php?f=62
or see top of previous page.

Hope that helps.
jmrker is offline   Reply With Quote
Old 10-23-2011, 10:16 AM   PM User | #5
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,599
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
If you get “$ is not a function” then you probably haven’t included the jQuery core framework before the call of that function. Can you show us a link to your page or post the source code here?
__________________
Don’t click this link!
VIPStephan is online now   Reply With Quote
Users who have thanked VIPStephan for this post:
pabozich (10-23-2011)
Old 10-23-2011, 02:57 PM   PM User | #6
pabozich
New to the CF scene

 
Join Date: Oct 2011
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
pabozich is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
If you get “$ is not a function” then you probably haven’t included the jQuery core framework before the call of that function. Can you show us a link to your page or post the source code here?
Thanks for the reply. The URL of the page is insidethehall.com. I've got this reference for jQuery in my header:

Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" language="javascript" type="text/javascript"></script>
The main thing I'm trying to fix are the tabs in the sidebar under the "Recruiting" section. They had been working for two years, but are no longer working. My novice guess is an error elsewhere is throwing it off.
pabozich is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:30 PM.


Advertisement
Log in to turn off these ads.