Monday, 15 September 2014

javascript - Why does the whole page refresh when I use jQuery to increase or decrease the font size? -


I have an HTML page, where clicking on the font size to reduce the font size and the same button amplify me Button is needed.

I am using jQuery like this:

  $ ("p"). CSS ("font-size", "20")  

However, when I do this, the size of the font probably increases for 2 seconds and then appears back to normal. The page is fresh after clicking on that button ... why is it?

You have a false return [Preventing the default job] so that the page can not be posted back.

In addition, I would suggest using two different CSS classes for this and using those sections

P>


No comments:

Post a Comment