I'm developing a Web application. As you see the picture I kept the menus as tabs in a separate file and called it to the main page using code.
there is no issue in it. I wanted to change the tabs classes according to the variables in the URL. I gave a try with javascript & jquery but it didn't work.
Banner File
Javascript File
I want to change add the current class the tabs which selected. Can some one help on this???
At what point is it going wrong? Are the "parts" as you expected after the regex? Why are you using the replace() method?
Open the debugging console in your browser and set breakpoints in the code. That way you can look at the value of variables and find out at what point it is going wrong. Why guess when you can actually inspect the variable at run time?
Bear Bibeault wrote:At what point is it going wrong? Are the "parts" as you expected after the regex? Why are you using the replace() method?
Open the debugging console in your browser and set breakpoints in the code. That way you can look at the value of variables and find out at what point it is going wrong. Why guess when you can actually inspect the variable at run time?
There is no issue in getUrlVars() method. It returns the URL variables. I'm quite sure there is something wrong with the code
Bear Bibeault wrote:Elements do not have an addClass method. You need to wrap the element with jQuery to use jQuery methods. E.g. $(element).addClass()