JQuery UI Question:

How can we apply css in div element using JQuery library?

Tweet Share WhatsApp

Answer:

This is example to apply css on a div element which have id name myDivId.
$(”#myDivId “).css(”border”,”3px solid red”);
To apply css on all div elements use below code.$(“div”).css(“border”,”3px solid red”);

Where$(“div”) pointing all div elements in the page.For You need to use.$(”P”) on above code.

Download JQuery User Interface PDF Read All 17 JQuery User Interface Questions
Previous QuestionNext Question
How can we submit a form by ajax using Jquery?How can we modify css class using JQuery library?