获取DOM style的封装 函数

函数定义:

function getStyleValue(text){
if (text){
return parseInt(text.replace(/px$/g, ''));
}else{
return 0;
}
}

函数调用:var a = getStyleValue(thisNOde.css('padding-top'));

posted @ 2013-02-17 14:02  mabel_on_line  阅读(292)  评论(0编辑  收藏  举报