Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

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 08-31-2011, 09:18 PM   PM User | #1
flashpointdevon
New to the CF scene

 
Join Date: Aug 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
flashpointdevon is an unknown quantity at this point
Cool Internet explorer: is null or not an object

anyone have an idea as to why this would be throwing an error in Internet Explorer? Its pretty bad too, nothing loads on my page except the menu =\ WHY IE WWHY!!@#$! lol

I've tried like document.getElementsByClassName and some other things but im completely lost on javascript in general. Anyone have any suggestions on this one? much appreciated =)

The error im getting is:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; HPDTDF; InfoPath.3; .NET4.0C)
Timestamp: Wed, 31 Aug 2011 19:35:46 UTC


Message: '$oe_menu_items_sub.bind(...).$oe_menu' is null or not an object
Line: 1
Char: 932
Code: 0
URI: menu.min.js

the code:
I know the same variables are being declared twice but I removed that and still get the err... On the line causing the error below I note it

Code:
var $oe_menu		= $('#oe_menu');
var $oe_menu_items	= $oe_menu.children('li');
var $oe_overlay		= $('#oe_overlay');


$oe_menu_items.bind('mouseenter',function(){
	var $this = $(this);
	$('.youtube').hide();
	$this.addClass('slided selected');
	$this.children('div').css('z-index','9999').stop(true,true).slideDown(200,function(){
		$oe_menu_items.not('.slided').children('div').hide();
		$this.removeClass('slided');
	});
}).bind('mouseleave',function(){
	var $this = $(this);
	$('.youtube').show(); 
	$this.removeClass('selected').children('div').css('z-index','1');
});
$oe_menu.bind('mouseenter',function(){
	var $this = $(this);
	$('.youtube').hide(); 
	$oe_overlay.stop(true,true).fadeTo(200, 0.6);
	$this.addClass('hovered');
}).bind('mouseleave',function(){
	var $this = $(this);
	$('.youtube').show(); 
	$this.removeClass('hovered');
	$oe_overlay.stop(true,true).fadeTo(200, 0);
	$oe_menu_items.children('div').hide();
})
var $oe_sub_menu		= $(".oe_menu_sub");
var $oe_menu_items_sub	= $oe_menu.children('li');
var $oe_overlay_sub		= $('#oe_overlay_sub');

THIS NEXT LINE IS WHERE THE ERROR IS HAPPENING
$oe_menu_items_sub.bind('mouseenter',function(){
	var $this = $(this);
	$this.addClass('slided selected');
	$this.children('div').css('z-index','9999').stop(true,true).slideDown(200,function(){
		$oe_menu_items_sub.not('.slided').children('div').hide();
		$this.removeClass('slided');
	});
}).$oe_sub_menu.bind('mouseenter',function(){
	var $this = $(this);
	$oe_overlay_sub.stop(true,true).fadeTo(200, 0.6);
	$this.addClass('hovered');
})
flashpointdevon is offline   Reply With Quote
Old 09-02-2011, 05:04 PM   PM User | #2
LRM
New Coder

 
Join Date: Sep 2011
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
LRM is an unknown quantity at this point
I'm just taking an educated guess here but I think its actually this line that's the culprit:
var $oe_sub_menu = $(".oe_menu_sub");

All the other definitions are using an id (#), this one is using a class (.).
check your HTML to see what the oe_menu_sub is. If its an id name change the dot to a pound sign #.

var $oe_sub_menu = $("#oe_menu_sub");
LRM 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 03:19 PM.


Advertisement
Log in to turn off these ads.