Send this to a friend
1 var IE = $.browser.msie, IEv = $.browser.version;
2
3 if (IE) {
4 var IE6 = parseInt(IEv) == 6,
5 IE7 = parseInt(IEv) == 7,
6 IE8 = parseInt(IEv) == 8,
7 IE9 = parseInt(IEv) == 9;
8 }
9
10
11
12 if (IE) {
13
14 }
15 if (IE7) {
16
17 }
18 if (IE7 || IE8) {
19
20 }
21 if (!IE6) {
22
23 }
var IE = $.browser.msie, IEv = $.browser.version;
if (IE) {
var IE6 = parseInt(IEv) == 6,
IE7 = parseInt(IEv) == 7,
IE8 = parseInt(IEv) == 8,
IE9 = parseInt(IEv) == 9;
}
if (IE) {
}
if (IE7) {
}
if (IE7 || IE8) {
}
if (!IE6) {
}
Send this to a friend
require jquery and modernizer
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 }
if(!Modernizr.input.placeholder){
$("input").each(function(){
if($(this).val()=="" && $(this).attr("placeholder")!=""){
$(this).val($(this).attr("placeholder"));
$(this).focus(function(){
if($(this).val()==$(this).attr("placeholder")) $(this).val("");
});
$(this).blur(function(){
if($(this).val()=="") $(this).val($(this).attr("placeholder"));
});
}
});
}
Send this to a friend
1 .test {
2 color: #000000;
3 color: #FFF000\9;
4 *color: #FFFF00;
5 color: #0000FF\0;
6 color: #00FFFF!important;
7 _color: #FF0000;
8 [color: #000000;
9 }
.test {
color: #000000;
color: #FFF000\9;
*color: #FFFF00;
color: #0000FF\0;
color: #00FFFF!important;
_color: #FF0000;
[color: #000000;
}
Send this to a friend
1 $(document).ready(function(){
2
3 $(window).bind("resize", resizeWindow);
4 function resizeWindow( e ) {
5 var newWindowHeight = $(window).height();
6 $("#container").css("min-height", newWindowHeight );
7 }
8
9 });
$(document).ready(function(){
$(window).bind("resize", resizeWindow);
function resizeWindow( e ) {
var newWindowHeight = $(window).height();
$("#container").css("min-height", newWindowHeight );
}
});
Send this to a friend
1 * html #selector {property:value;}
2 *+html #selector {property:value;}
* html #selector {property:value;}
*+html #selector {property:value;}
Send this to a friend
1
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 });
$(document).ready(function(){
if(jQuery.browser.msie && jQuery.browser.version<7){
$('[class*="bla"]').hover(
function () {
$(this).addClass('hover');
},
function () {
$(this).removeClass('hover');
}
);
}
});
Send this to a friend
ie sux!
1 input { overflow: visible; }
input { overflow: visible; }
Send this to a friend
1 var iframeDoc;
2 if (window.frames && window.frames.preview_frame && (iframeDoc = window.frames.preview_frame.document)) {
3 iframeDoc.body.style.backgroundColor="#DADADA";
4 }
var iframeDoc;
if (window.frames && window.frames.preview_frame && (iframeDoc = window.frames.preview_frame.document)) {
iframeDoc.body.style.backgroundColor="#DADADA";
}
Send this to a friend
1 function isIE() {
2 return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
3 }
function isIE() {
return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
}
Send this to a friend
create a 1×1 ‘clear.gif’ image
1 var clear="images/clear.gif"
2
3 pngfix=function(){var els=document.getElementsByTagName('*');var i_p=/\.png/i;var i=els.length;while (i-- >0){var el=els[i];var es=el.style;if(el.src&&el.src.match(i_p)&&es.filter==''){el.height = el.height;el.width = el.width;es.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+el.src+"',sizingMethod='crop')";el.src = clear;}else{var elb=el.currentStyle.backgroundImage;if(elb.match(i_p)){var path=elb.split('"');var rep=(el.currentStyle.backgroundRepeat=='no-repeat')?'crop':'scale';es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"',sizingMethod='"+rep+"')";es.height=el.clientHeight+'px';es.backgroundImage="none";}}if (el.currentStyle.position!='absolute' && !es.filter && !el.tagName.match(/(body|html|script)/gi)) es.position="relative";if (es.filter&&el.currentStyle.position=="relative") es.position="static";}}
4 window.attachEvent('onload',pngfix);
var clear="images/clear.gif"
pngfix=function(){var els=document.getElementsByTagName('*');var i_p=/\.png/i;var i=els.length;while (i-- >0){var el=els[i];var es=el.style;if(el.src&&el.src.match(i_p)&&es.filter==''){el.height = el.height;el.width = el.width;es.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+el.src+"',sizingMethod='crop')";el.src = clear;}else{var elb=el.currentStyle.backgroundImage;if(elb.match(i_p)){var path=elb.split('"');var rep=(el.currentStyle.backgroundRepeat=='no-repeat')?'crop':'scale';es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"',sizingMethod='"+rep+"')";es.height=el.clientHeight+'px';es.backgroundImage="none";}}if (el.currentStyle.position!='absolute' && !es.filter && !el.tagName.match(/(body|html|script)/gi)) es.position="relative";if (es.filter&&el.currentStyle.position=="relative") es.position="static";}}
window.attachEvent('onload',pngfix);