Jump to content

Jquery functions all in one file


Pavlos1316

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.