javascript - setting style with jquery to paragraphs in a div -


its simple setup css , line of javascript make changes:

#pass p {     overflow: hidden;     width: inherit; } 
<div id="pass">     <p></p>     <p></p> </div> 
$("#pass > p").setstyle({backgroundcolor:$('colorpicker3').style.backgroundcolor}); 

does know how set style of paragraphs jquery ? thank you

you should use css() method set style of element in jquery:

$("#pass p").css('background-color', $('colorpicker3').css('backgroundcolor')); 

note however, it's better practice set styles in css , use addclass set on required elements. also, $('colorpicker3') selector not correct. assuming it's class need precede ., or if it's id needs #.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -