Move document.ready function to a separate javascript fucntion?
Posted
by tonsils
on Stack Overflow
See other posts from Stack Overflow
or by tonsils
Published on 2010-06-03T11:20:33Z
Indexed on
2010/06/03
11:24 UTC
Read the original article
Hit count: 176
JavaScript
|jQuery
Hi,
Is it possible to move the following code within a jQuery document.ready function into a separate javascript function, so that it can be called just like any other javascript function, i.e.:
<script type="text/javascript">
$(document).ready(function()
{
$('div#infoi img[title]').qtip({
position: {
adjust: { x:-110, y:0 },
corner: {
target: 'bottomLeft',
tooltip: 'topMiddle'
}
},
style: {
width: 250,
padding: 5,
background: '#E7F1FA',
color: 'black',
textAlign: 'center',
border: {
width: 3,
color: '#65a9d7'
},
tip: 'topRight'
}
});
});
</script>
If yes, then how - if not, then that answers my question.
Thanks.
© Stack Overflow or respective owner