Add class using jquery change style jquery- Php Codehub

Add class using jquery change style jquery- Php Codehub

Add class using jquery change style jquery- Php Codehub:On click add class,on click add id,The jquery is using for change style of div ,pagraph,h.The jquery is scripting language which are used for create more attrictive design.On click change the style of a div,span and pragrap using jquery,learn jquery,javascript,jquery tutorial,baisc working exmple for learn jquery.on click add class jquery.on mouse hover add class jqury,jquery add class example and demo.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#change").click(function(){
        $("h1, h2, p").addClass("blue");
        $("div").addClass("important");
    });
});
</script>
<style>
.important {
    font-weight: bold;
    font-size: xx-large;
}

.blue {
    color: blue;
}
</style>
<h1>Title 1</h1>
<h2>Title 2</h2>

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

<div>This is some important text!</div><br>

<button id="change">Add classes to elements</button>
Add class using jquery change style using jquery

Add class using jquery change style using jquery


Share Button

About admin

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Author: pramod kumar kumawat Mob: 9269727062
Free WordPress Themes - Download High-quality Templates