Where to put jQuery code for DOM manipulation in Codeigniter
I have some jQuery code that deals with DOM manipulation, simple stuff like fade开发者_如何学CIn(), etc...
Is the best practice to put
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
and any script associated with manipulating the HTML on a CI view right on the view.php file?
Thanks
That's eminently reasonable. If you're using jQuery you should probably wrap your manipulation code in a ready
call.
精彩评论