javascript - How come I cant add code after changing the css of button with jquery? -
function test() { //allows code here $("#h1").css("background-color", "yellow").replace("px", "") * 2; //denys code here }
below im trying archieve:
function test() { $("#h1").css("background-color", "yellow").replace("px", "") * 2; $("#h2").css("background-color", "black").replace("px", "") * 2; }
any or input how deal highly appreciated, thanks!
edit: got here border-left-width returns nan in jquery create code
change
$("#h1").css("background-color", "yellow").replace("px", "") * 2; $("#h2").css("background-color", "black").replace("px", "") * 2;
to
$("#h1").css("background-color", "yellow"); $("#h2").css("background-color", "black");
you replacing background color .css("background-color", "yellow") . unless there specific reason doing replace , multiply (which not work "background-color", "yellow") remove it.
Comments
Post a Comment