How can we apply css in div using jquery?



How can we apply css in div using jquery?..

Answer / Nishant Kumar

To apply CSS to a div using jQuery, you can use the .css() method. Here's an example:

```javascript
$('#myDiv').css('color', 'red'); // Change color of #myDiv to red
```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More jQuery Interview Questions

Which is fast document.getElementByID('txtName') or $('#txtName').?

1 Answers  


What is the use of queue() in jquery?

1 Answers  


Explain jquery $.ajax() method?

1 Answers  


How you will use jquery means requirement needed for using jquery.

1 Answers  


How to multiple version of jQuery?

1 Answers  


Which version of jquery file should be used?

1 Answers  


Is it possible to use other client side libraries like MooTools, Prototype along with jQuery?

1 Answers  


List the advantage of using minimized version of jquery?

1 Answers  


What is the difference between the id selector and class selector in jquery?

1 Answers  


How to get the style property of an element using ?

1 Answers  


Tell me how to check data type of any variable in jquery? : jquery mobile

1 Answers  


How to delete cookies in jquery?

1 Answers  


Categories