Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Adding css property using jQuery

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 323
    Comment on it

    Hii All ,

    • Jquery is a type scripting langauge created by John Resig along with his team in 2006.
    • It is a client side script programming language.
    • It is a concise javascript library.
    • Both javascript and jquery is used for script programming bt jQuery is very lightweight faster  and simpler library.
    • jQuery is a open source software i.e you can use jQuery free of cost.
    • The syntax of jQuery is designed in such a way so that it will be easily implemented by programmers.
    • We need to have proper knowledge of javascript to learn and understand jQuery.
    • Using jQuery we can easily select DOM elements and traverse them, create animations,navigate documents, handles many events like adding a class without  the changing the  HTML code, modify content.
    • The main motto behind deveplopment of this javascript library was to optimise programming,reducing page load.
    • jQuery is also used for deveploping AJAX application such as developing a dynamic website.
    • jQuery supports many cross browsers such as IE 6.0+, FF 2.0+, Safari 3.0+, Chrome and Opera 9.0+.

    Example:

    Html:

    <div id="DivOne" class="oddNum">One</div>
    <div id="DivTwo" class="evenNum">Two</div>
    <div id="DivThree" class="oddNum">Three</div>
    <button id="btnOne">Reset odd numbers</button>
    <button id="btnTwo">Reset even numbers</button>

    JQuery:

    $('.oddNum').css('background-color', '#DEA');
    $('#DivTwo').css('background-color', '#FCC');
    
    $('#btnOne').click(function() {
        // Action goes here
        $('.oddNum').css('background-color', '#FFF');
    });
    $('#btnTwo').click(function() {
        // Action goes here
        $('#DivTwo').css('background-color', '#FFF');
    });

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: