click - Move inline JQuery function to .js file -


i have following inline code move js file ...

$("input.checkbox").live('click',function(dostuff){my code}) 

i have tried various ways no luck, function nothing when move .js file. when it's inline in works perfectly. quite new @ of gentle.

1- move code new js file did.

2- when referencing js file inside page, reference after jquery file, javascript executed according order of files included.

<html>     <head>         <script type="text/javascript" src="your_jquery_file"></script>         <script type="text/javascript" src="your_custom_file"></script>     </head>     <body>         ..         ..         ..       </body>  </html> 

3- try page now, should working fine.

let me know if didn't fix it, or if did :)


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -