Pavlos1316 Posted November 18, 2014 Share Posted November 18, 2014 I have couple jquery codes in a single file: $(document).ready(function(){ $('#all').delegate('a.link', 'click', function(){ //more code here }) $('body').delegate('.nice', 'click', function(){ //more code here }) }); This works great but is it better to close each function using ; symbol? Even if I do or not the code works ok, BUT whats the correct way? Link to comment https://forums.phpfreaks.com/topic/292556-jquery-functions-all-in-one-file/ Share on other sites More sharing options...
CroNiX Posted November 18, 2014 Share Posted November 18, 2014 Using ; like you are on the $(document).ready() Link to comment https://forums.phpfreaks.com/topic/292556-jquery-functions-all-in-one-file/#findComment-1496957 Share on other sites More sharing options...
Pavlos1316 Posted November 18, 2014 Author Share Posted November 18, 2014 Using ; like you are on the $(document).ready() Thank you Link to comment https://forums.phpfreaks.com/topic/292556-jquery-functions-all-in-one-file/#findComment-1496960 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.