www.webdeveloper.com
Results 1 to 2 of 2

Thread: jQuery if not IE, change style

  1. #1
    Join Date
    Jan 2003
    Location
    UK
    Posts
    267

    jQuery if not IE, change style

    Hi all,

    The !IE HTML tag isn't working so I am trying to use jQuery. The code below isn't working. Please can you help?

    Code:
    <div id="notie">
    <img src="images/warning.png" /> I'm sorry, you're not using Internet Explorer 9+. For technical reasons you will need to use Internet Explorer 9+ to copy the templates.
    </div>
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
    <script type="text/javascript">
    !$.browser.msie('#notie').css('display','block');
    </script>
    </body>
    </html>

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,648
    Code:
    if(navigator.userAgent.indexOf('MSIE')!=-1){...IE...}
    else{...another browser...}
    xxx: Guess Buddhist riddle: "What is the sound of one hand clapping?"
    yyy: facepalm

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles