I am using an jQuery plugin to overlay image effects on mouseover. since i don’t want to have them effects only shown by mouseover but directly when the site has loaded, I am trying to change that code:
//binding events for mouseover
$(this).parent().bind('click',function(){
if(settings.hoverEffect=='normal')
{
......
The tricky part is the:
$(this).parent().bind('click',function(){
I need a way to get rid of the ‘click’ function, I tried ‘ready’ but it doesn’t work. can anyone help me out with that? I basically just need the function to be run when the page has loaded, or even better the image the effect will be applied on (this).parent.
triggerimmitates a click on the specified element and will trigger the function. Done this way you don’t have to create double up of the function