Quote:<!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <script> $(document).ready(function(){ $("#test").click(function(){ $("p:last").removeClass("intro").addClass("main"); }); }); </script> <style type="text/css"> .intro { color:red; } .main { background-color:yellow; } </style> </head> <body> <a href="test2.html" id="test">go to next</a> </body> </html
Quote:Quote:<!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <script> $(document).ready(function(){ $("#test").click(function(){ $("p:last").removeClass("intro").addClass("main"); }); }); </script> <style type="text/css"> .intro { color:red; } .main { background-color:yellow; } </style> </head> <body> This is a paragraph. </body> </html now when i click on go to next then page will be redirected to test2.html then on test2.html page intro class rename with main class (
Quote:<!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <script> $(document).ready(function(){ $("#test").click(function(){ $("p:last").removeClass("intro").addClass("main"); }); }); </script> <style type="text/css"> .intro { color:red; } .main { background-color:yellow; } </style> </head> <body> This is a paragraph. </body> </html
This is a paragraph.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)