IE Public Service Ribbon


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. /*
  2. Include jQuery Library
  3.  
  4. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
  5. */
  6.  
  7. $(document).ready(function(){
  8. pubService();
  9. });
  10.  
  11. function pubService(){
  12. if($.browser.msie){
  13. pubServiceString = 'Internet Explorer is bad. Try using any of the following secure and free alternatives instead: '+
  14. '<a href="http://www.mozilla.com/en-US/firefox/personal.html">Firefox</a>, '+
  15. '<a href="http://www.google.com/chrome">Google Chrome</a>, '+
  16. '<a href="http://www.apple.com/safari/">Safari</a>.';
  17.  
  18. $('body').prepend('<div id="pubService"></div>').css({'margin':0});
  19.  
  20. $('#pubService').css({
  21. 'background-color':'#FFA896',
  22. 'color':'#000',
  23. 'padding':'10px',
  24. 'text-align':'center',
  25. 'border-bottom':'1px solid #000'
  26. }).append(pubServiceString);
  27. }
  28. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.