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 Link to comment https://forums.phpfreaks.com/topic/192451-just-a-quick-question/ 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 Link to comment https://forums.phpfreaks.com/topic/192451-just-a-quick-question/#findComment-1014069 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. Link to comment https://forums.phpfreaks.com/topic/192451-just-a-quick-question/#findComment-1014079 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.