dépôts
/
ptitvelo
/
web
/
www.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
~maj plugins
[ptitvelo/web/www.git]
/
www
/
plugins
/
crayons
/
js
/
jquery.px.js
1
// Ce plugin permet de recuperer css(fontSize) en px meme sous MSIE
2
(
function
($){
3
$.
fn
.
px
=
function
(
prop
) {
4
var
val
;
5
if
($.
browser
.
msie
) {
6
$(
'<span><\/span>'
)
7
.
css
({
display
:
'block'
,
width
:
'1em'
})
8
.
appendTo
(
this
[
0
])
9
.
each
(
function
(){
10
val
=
parseInt
($(
this
).
width
()) +
'px'
;
11
})
12
.
remove
();
13
}
else
{
14
val
=
this
.
css
(
prop
);
15
}
16
return
val
;
17
};
18
})(
jQuery
);