Here is the jsFiddle: http://jsfiddle.net/JFwDw/2/
What I’m wanting to do is use links to change the font-size and line-height of paragraphs only within a division id’d “content”. I’ve made another division to make sure it isn’t changing anywhere else… can’t get it to work after a while of playing around with it.
Thanks in advance.
You want to change which selector you’re using. Instead of doing to all
ptags, you just want the ones under#contentDEMO
Your links also link to
<a href=""...which causes the page to reload. I changed it tohref="#"so this doesn’t happen. You could also prevent the default event from happening inside the functions.On a side note, I can’t figure out why the functions are not working in the JS part of the fiddle…