Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jquery slider not working in IE8

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
0
0
GB
Hi,

I have a navigation tab system that uses jquery to 'slide' content via anythingslider.

It works in IE9 / IE9 (Compatability) / FireFox / Opera / IE8 (Compatability)

It won't work in IE8 standard mode?


It's the right hand column where there are tabs for the sub-sections.

The same slider however does work on the other pages in IE8 standard mode.

The only difference here is there is more than one on the same page, perhaps related?

Any ideas greatly received!

1DMF

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Electronic Dance Music Download
 
Multiple elements with the same ID tend to confuse browsers, and as there are multiple elements with an ID of "anythingWindow", I suspect you're right about having multiple copies.

Perhaps getting in touch with the plugin author (or reading their support forums if they have one) might give more info about how to work around this issue?

Incidentally, the anchor at line 907 on your homepage is erroneously closed early:

Code:
<p style="text-align:left;">Simply visit the 'Join' section of our website to find out how you can become a DMO artist and <a href="/join-dance-music-organisation.html" title="Join Dance-Music.org" [!]/[/!]>upload &amp; promote your electronic dance music for free</a>.</p>

Hope this helps,

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[blue]@[/blue] Code Couch:
[blue]@[/blue] Twitter:
 
dang, I really must pay more attention, that anchor shouldn't be closed like that, thanks Dan.

I guess you're saying the anythingslider is adding duplicate ID's to things?

I'll look at the script, I have played about with it a little already, so i'm not scared to poke around (no i didn't break it - well I hope it wasn't me [ponder] )

Yes, 'Cargo Cult' I know!

I've been thinking of rolling my own with jquery slider, but then again, isn't the point (ok this isn't OO, but anyway), of OOP 're-use of code' and not needing to know how functions/methods work 'under the hood', you just need to know the input/output/protocol to use it.

1DMF



"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Electronic Dance Music Download
 
Dan,

I've corrected the erroneous multiple id names. (probbaly my dumb behind who did that!)

However, it's made no difference?

What else could be the problem?

Also IE8 on XP is giving a certificate error?

It seems the G+1 API is loading JS from https with an invalid certificate.

How do I stop this?

Thanks,
1DMF

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Electronic Dance Music Download
 
This is interesting. I updated the slider script as there was another version available.

It's fixed it, well sort of!

Now if you click normaly it doesn't work. If you click a tab normally twice it works, but the content sort of 'appears' rather an animated 'slide'.

If you click and hold the mouse button down on a tab or hold for a longer while and let go, it works normally?

Very odd behaviour, the event is an onlick, but it is behaving rather strangely only in IE8 standard mode?

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Electronic Dance Music Download
 

I'm still seeing multiple elements with the same ID (there are 3 with an ID of "anythingWindow"):

Code:
document.querySelectorAll('#anythingWindow').length;   // shows 3

While I can't say for sure, this would explain the jumping behaviour you are seeing (which I also saw yesterday): if IE is directing all the movement to one slider, using multiple controls would cause one slider to jump if it was being moved more than once.

Dan

 
Dan,

I guess I need to hunt the new JS for anythingWindow ID.

What are you using to get the dynamic page content, I have firebug installed but all it gives me is inspector and you have to hover around the page to try to find the content?

View source in FF just gives me the static content not the dynamically modified DOM.

1DMF



"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Electronic Dance Music Download
 
Having looked at the JS, I can only find this
Code:
base.$el = $(el).addClass('anythingBase').wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>');
and
Code:
base.$window = base.$el.closest('div.anythingWindow');
with the wording 'anythingWindow'

And the source HTML itself doesn't use any ID's with that name?

I don't understand where these ID's are coming from?

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Electronic Dance Music Download
 

That's weird - they don't show for me in IE, but they do in Chrome. Now I'm confused as well, but as it's 3:30am here I'm not going to work out why at the moment... sleep is calling :)

Dan


 

anyway, if it isn't showing in IE, then it can't be that breaking IE?

Well, that's true. Of course, it could be that IE 8's inspector is pants (which it is) and isn't showing me the invalid part of the document (multiple IDs are invalid). But without knowing this for sure, it's hard to say, and you'd need IE to report them to know about them (there's a hole in my bucket...).

Perhaps it might be easier to find a different slider :-D

 
Perhaps it might be easier to find a different slider

I've spend hours implementing this anythingslider, getting it all looking great and well it works in all browsers apart from IE8 standard, and then sort of works.

Do you still see multiple ID's in Opera? you sure you weren't viewing a cached page.

I cannot find what code might be creating duplicate ID's if they are still there.

anyway, up to my neck at work at the moment with trying to get PERL to run on IIS7 (64bit doesn't), finally got 32bit running, so now I can start the actual migration. Why can't things be simple and just work [ponder]



"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Electronic Dance Music Download
 

I no longer see multiple IDs. Even though I forced a refresh, Chrome must've been caching something.

Sorry for the confusion!

Dan

 
Well... my recommendation would be to create a cut-down test page with no other markup, JS, or CSS other than that to demonstrate 2x sliders with a few tabs each. Make sure all the markup and CSS validate as well.

If both sliders work, then you know the slider works in your scenario and it's something else on your page causing the issue. If either slider fails, you know your page isn't an issue, and you need to rework the slider code or find a new one.

At least you'll know one way or the other (I'm gonna getcha, gonna getcha getcha getcha getcha, one way, or the other.. ad infinitum ;-))

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[blue]@[/blue] Code Couch:
[blue]@[/blue] Twitter:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top