$(document).ready(function() outside head
- by user2103217
I'm trying to move outside from head this code.
<script type="text/javascript">
$(document).ready(function(){
$('.emoticontext').emoticonize({
});
})
</script>
I would like insert into a js file.
like
<script src="javascripts/emoticons.js" type="text/javascript"></script>
but I'm not sure how can I do it.
I tried
(function($) {
$('.emoticontext').emoticonize({
});
$.fn.emoticonize = function(options) {
...
but don't work