• IF IE then Hide this Jquery - Is this possible?
    13 replies, posted
My second post in about 2-3 days in this forum, hope you don't mind me asking too many questions, I just can't find them on google. But the question is, I have a nice Jquery slider that I placed as banner on my site but it'll totally break in IE, I understand there is an 'IF IE' tag that I can use but how about an IF IE THEN hide my slider and show something else instead? Is this possible? Thanks in advance
[code]<![if !IE]> You're not using ie! <![endif]>[/code]
you can use [code]if($.browser.msie) {... }[/code]
[QUOTE=Ignition2k;39956686]My second post in about 2-3 days in this forum, hope you don't mind me asking too many questions, I just can't find them on google. But the question is, I have a nice Jquery slider that I placed as banner on my site but it'll totally break in IE, I understand there is an 'IF IE' tag that I can use but how about an IF IE THEN hide my slider and show something else instead? Is this possible? Thanks in advance[/QUOTE] Also, if you know what specific features aren't working in IE then you could use Modernizr to detect whether the browser supports that specific feature and do something depending on that. Benefit of this being, all browsers that don't support your plugin will have a fallback, rather than just IE. You can set fallbacks for pretty much anything using that with 'Yes/Nope'. Basically you say if a feature is supported, run this script/use this css, if not, run this one.
That'd be cool, and I'll probably look into using Modernizr, but what I needed was to hide a whole div from IE, not load a different css or script... I wanted to subtract HTML instead of adding...
[QUOTE=kragmars102;39956775]you can use [code]if($.browser.msie) {... }[/code][/QUOTE] That has actually been removed in newer version of jQuery.
[QUOTE=Amiga OS;39957324]Please keep in mind that Microsoft have depreciated these conditional tags in IE10.[/QUOTE] Did they explain why?
[QUOTE=Ignition2k;39956972]That'd be cool, and I'll probably look into using Modernizr, but what I needed was to hide a whole div from IE, not load a different css or script... I wanted to subtract HTML instead of adding...[/QUOTE] You can do that, if you figure out what's wrong you can load CSS telling it to do whatever you like. (so display none is easily done) Rhyme not intended
Is there a specific reason why you don't want it in IE? modernizr might be someting you could use.
Just use some up-to-date HTML 5 tags, you're guaranteed that IE doesn't support them.
What awful image slider are you using that doesn't work out of the box in IE9/10? Is IE running in compatibility mode or something?
You are right, SteveUK and Miljaker, I was pre-viewing my web site in IE and it kept asking me for ActiveX permission, I didn't know that would not be prompted to the user on the real web site, once it's hosted, after researching some, it seems it only happens locally, anyway I won't be needing to hide anything anymore in IE, I'll use the same slider for all browsers :) Hehe, forgive the noob moment
Sorry, you need to Log In to post a reply to this thread.