you are in: codestackercodes [RSS] → tag: ie [RSS]

detecting ie version with jquery Delicious Email

show/hide lines
   1  var IE = $.browser.msie, IEv = $.browser.version;
   2  
   3  if (IE) { //could be improved
   4      var IE6 = parseInt(IEv) == 6,
   5          IE7 = parseInt(IEv) == 7, 
   6          IE8 = parseInt(IEv) == 8, 
   7          IE9 = parseInt(IEv) == 9;
   8  }
   9  
  10  //Usage:
  11  
  12  if (IE) {
  13      //Do something for all IE versions
  14  }
  15  if (IE7) {
  16      //Do stuff just for IE7
  17  }
  18  if (IE7 || IE8) {
  19      //Do stuff just for IE7 or IE8
  20  }
  21  if (!IE6) {
  22      //Do something if not IE6
  23  }
created by leozera — 11 July 2011 — get a short url — tags: browser ie jquery embed

placeholder attribute for inputs in IE Delicious Email

require jquery and modernizer

show/hide lines
   1  if(!Modernizr.input.placeholder){
   2  	$("input").each(function(){
   3  		if($(this).val()=="" && $(this).attr("placeholder")!=""){
   4  			$(this).val($(this).attr("placeholder"));
   5  			$(this).focus(function(){
   6  				if($(this).val()==$(this).attr("placeholder")) $(this).val("");
   7  			});
   8  			$(this).blur(function(){
   9  				if($(this).val()=="") $(this).val($(this).attr("placeholder"));
  10  			});
  11  		}
  12  	});
  13  }
created by leozera — 08 March 2011 — get a short url — tags: browser hack ie jquery embed

color scrollbars for ie 5.5 Delicious Email

show/hide lines
   1  body {
   2  scrollbar-face-color: #hex; 
   3  scrollbar-shadow-color: #hex; 
   4  scrollbar-highlight-color: #hex; 
   5  scrollbar-3dlight-color: #hex; 
   6  scrollbar-darkshadow-color: #hex; 
   7  scrollbar-track-color: #hex; 
   8  scrollbar-arrow-color: #hex;
   9  }
created by leozera — 23 January 2011 — get a short url — tags: css ie scroll embed

ie 6 and 7 selectors hack Delicious Email

show/hide lines
   1  * html #selector {property:value;} /* Only IE6 and lower will see this */
   2  *+html #selector {property:value;} /* Only IE7 will see this */
created by leozera — 22 August 2009 — get a short url — tags: browser hack ie ie6 ie7 embed

paperclip ie validation Delicious Email

show/hide lines
   1  validates_attachment_content_type :image,
   2    :content_type => [
   3      'image/jpeg',
   4      'image/pjpeg', # for progressive jpeg (IE mine-type for regular jpeg) 
   5      'image/png',
   6      'image/x-png', # IE mine-type for PNG
   7      'image/gif'
   8  ]
created by leozera — 16 August 2009 — get a short url — tags: ie paperclip rails ruby embed

hover for ie 6 Delicious Email

show/hide lines
   1  /* IE6 - pseudo class :hover */ 
   2  $(document).ready(function(){ 
   3  	if(jQuery.browser.msie && jQuery.browser.version<7){ 
   4  		$('[class*="bla"]').hover( 
   5  		function () { 
   6  			$(this).addClass('hover'); 
   7  		}, 
   8  		function () { 
   9  			$(this).removeClass('hover'); 
  10  		} 
  11  		); 
  12  	} 
  13  });
created by leozera — 10 August 2009 — get a short url — tags: browser hack ie ie6 javascript jquery embed

fixing the ridiculous auto-padding in ie (win) submit buttons Delicious Email

ie sux!

show/hide lines
   1  input { overflow: visible; }
created by leozera — 14 March 2009 — get a short url — tags: browser css hack ie embed

detect ie function Delicious Email

show/hide lines
   1  function isIE() {
   2    return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
   3  }
created by leozera — 26 November 2008 — get a short url — tags: browser ie javascript embed

ie conditional hack Delicious Email

show/hide lines
   1  <!--[if IE]>
   2  	<link rel="stylesheet" type="text/css" href="ie-only.css" />
   3  <![endif]-->
   4  
   5  # Embedded CSS
   6  <!--[if IE]>
   7    <style type="text/css">
   8      #container {font-family: arial,verdana,sans-serif,tahoma;}
   9    </style>
  10  <![endif]-->
  11  
  12  # The opposite technique, targeting only NON-IE browsers:
  13  <!--[if IE]>
  14  	<link rel="stylesheet" type="text/css" href="ie-only.css" />
  15  <![endif]-->
  16  
  17  # Target specific versions of IE
  18  # IE 7 ONLY:
  19  <!--[if IE 7]>
  20  	<link href="IE-7-SPECIFIC.css" rel="stylesheet" type="text/css">
  21  <![endif]-->
  22  
  23  # IE 6 ONLY:
  24  <!--[if IE 6]>
  25  	<link rel="stylesheet" type="text/css" href="IE-6-SPECIFIC.css" />
  26  <![endif]-->
  27  
  28  # IE 5 ONLY:
  29  <!--[if IE 5]>
  30  	<link rel="stylesheet" type="text/css" href="IE-5-SPECIFIC.css" />
  31  <![endif]-->
  32  
  33  # IE 5.5 ONLY:
  34  <!--[if IE 5.5000]>
  35  <link rel="stylesheet" type="text/css" href="IE-55-SPECIFIC.css" />
  36  <![endif]-->
  37  
  38  # VERSION OF IE VERSION 6 OR LOWER: (I find this one pretty handy)
  39  <!--[if lt IE 7]>
  40  	<link rel="stylesheet" type="text/css" href="IE-6-OR-LOWER-SPECIFIC.css" />
  41  <![endif]-->
created by leozera — 17 September 2008 — get a short url — tags: css hack ie embed

another ie 6 hack Delicious Email

show/hide lines
   1  p {			
   2  	background: green !important; /* Major browsers other than IE 6 and below respect the importance immediately */
   3  	background: red; /* IE 6 and below use this value instead, even though the above was marked as important */
   4  }
created by leozera — 23 July 2008 — get a short url — tags: css hack ie ie6 embed
Displaying records 1 - 10 of 11