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 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 }
body {
scrollbar-face-color: #hex;
scrollbar-shadow-color: #hex;
scrollbar-highlight-color: #hex;
scrollbar-3dlight-color: #hex;
scrollbar-darkshadow-color: #hex;
scrollbar-track-color: #hex;
scrollbar-arrow-color: #hex;
}
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 validates_attachment_content_type :image,
2 :content_type => [
3 'image/jpeg',
4 'image/pjpeg',
5 'image/png',
6 'image/x-png',
7 'image/gif'
8 ]
validates_attachment_content_type :image,
:content_type => [
'image/jpeg',
'image/pjpeg',
'image/png',
'image/x-png',
'image/gif'
]
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 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
1
2
3
4
5 # Embedded CSS
6
7
8
9
10
11
12 # The opposite technique, targeting only NON-IE browsers:
13
14
15
16
17 # Target specific versions of IE
18 # IE 7 ONLY:
19
20
21
22
23 # IE 6 ONLY:
24
25
26
27
28 # IE 5 ONLY:
29
30
31
32
33 # IE 5.5 ONLY:
34
35
36
37
38 # VERSION OF IE VERSION 6 OR LOWER: (I find this one pretty handy)
39
40
41
# Embedded CSS
# The opposite technique, targeting only NON-IE browsers:
# Target specific versions of IE
# IE 7 ONLY:
# IE 6 ONLY:
# IE 5 ONLY:
# IE 5.5 ONLY:
# VERSION OF IE VERSION 6 OR LOWER: (I find this one pretty handy)
Send this to a friend
1 p {
2 background: green !important;
3 background: red;
4 }
p {
background: green !important;
background: red;
}