$(document).ready(function() outside head
Posted
by
user2103217
on Stack Overflow
See other posts from Stack Overflow
or by user2103217
Published on 2013-11-04T15:48:22Z
Indexed on
2013/11/04
15:53 UTC
Read the original article
Hit count: 163
JavaScript
|jQuery
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
© Stack Overflow or respective owner