Orionsbelter Posted February 18, 2010 Share Posted February 18, 2010 I am very new to javascript i was looking over some code and found something i didn't understand function scroll(d){ if(d == "up"){ $("#log").scrollTo('-=100px',800); } else { $("#log").scrollTo('+=100px',800); } my question is why is there a $ within the code as i know its not how they do variables is it too do with html or css elements? thank you for reading and any help you can give Quote Link to comment Share on other sites More sharing options...
Orionsbelter Posted February 18, 2010 Author Share Posted February 18, 2010 found it here http://www.authenticsociety.com/blog/JavaScript_DollarSign Quote Link to comment Share on other sites More sharing options...
trq Posted February 18, 2010 Share Posted February 18, 2010 You can name variables $ within Javascript. Given that jQuery uses $ to store the jQuery object and that there is a plugin for jQuery called scrollTo I would say the code you have there is jQuery. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.