In this article I want to explain about Change Colors using CSS and JQuery. This is basic level tutorial just changing stylesheet using jQuery script.
Please share your comments and feedback.Thanks.Please subscribe my updates via email.
Live DemoDownload Script
Call CSS file using button click using jQuery function.
Defintion and Explanation:
The attr() method sets or returns attributes and values of the selected elements.
Syntax:
$(selector).attr(attribute);
Call CSS file using button click using jQuery function.
Defintion and Explanation:
The attr() method sets or returns attributes and values of the selected elements.
Syntax:
$(selector).attr(attribute);
Jquery function to call CSS file
$(document).ready(function() {
$(".blue").click(function(){ //Btn Class name
$("link").attr("href", "css/blue.css"); //Css file name with path
return false;
});
});
$(".blue").click(function(){ //Btn Class name
$("link").attr("href", "css/blue.css"); //Css file name with path
return false;
});
});
No comments:
Post a Comment