Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
BRH 48
#DOTNET 34
#ASP.NET 29
jQuery 22
ASP.NET 20
.NET 20
WPF 9
jquery interview questions 9
jquery faq 8
ASP.NET4 8

Archive · View All
February 2011 10
September 2011 4
August 2011 4
July 2011 4
May 2011 4
April 2011 4
March 2011 4
October 2011 4
June 2011 4
January 2011 4

Playing with CSS in jQuery – How to work with CSS in jQuery?

Mar 19 2011 4:24PM by Hima   

How can we apply css to elements using JQuery library.

The below example is to apply css on div element that has id as DivId.

$(”#DivId “).css(”border”,”4px  red”);

To apply css in odd childs of parent node using JQuery library.

$(”tr:odd”).css(”background-color”, “#bbbbff”);

To apply css in even childs of parent node using JQuery library.

$(”tr:even”).css(”background-color”, “#bbbbff”);

To apply css in last child of parent using JQuery library.

$(”tr:last”).css({backgroundColor: ‘yellow’, fontWeight: ‘bolder’});

Now How can we modify css class using JQuery library?

Suppose that Css class has following definition

.class 
{ 
font-size:10px; 
font-weight:normal; 
color:#000000; 
}

Now  if we are intrested to  add border property on above class, so we should follow below code.

$(“.class”).css(“border”,”1px solid blue”); 

Where $(“.class”) name of css class. Now .class will automatically add border property in his class definition.

Happy jQuerying !!!!

Tags: BRH, jQuery, jQueryinterview questions, using css in jQuery,


Hima
31 · 6% · 1776
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]