jquery - Javascript lock css change display -


i whant do few css changes single element in single script, whant changes displayed @ once. example :

$("#someelement").css({width:"100%"}); //this change should not displayed $("#someelement").width($("#someelement").width()-$("#somelement #child").width()); //in case have problem count #child's width if depends on #someelement's width 

in sceneario calculate element's max width setting 100% before. don't whant change visible user, whant $("#someelement").width($("#someelement")-$("#somelement #child").width()); applied. there way lock , unlock user interface while?

as understand browser renders whenever box model changes, there's question, how can prevent , stack more changes until browser flush them?

try

//$("#someelement").css({width:"100%"}); // youre not gonna need $("#someelement").width($("#someelement").parent().width() - $("#somelement #child").width()); 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -