Skip to content Skip to sidebar Skip to footer

Colorbox And Preventdefault Not Working Together?

I'm calling a colorbox using jquery and trying to prevent the address from changing but it seems to trigger an address change every time. Here is my current code:
$(".contact").colorbox({width:"600px", height: "420px", inline:true, href:"#send_alert_div"});

Your other issue sounds unrelated. It's going to be difficult to instruct you on what to do without seeing what code is causing your 'address change', but if it is a simple event binding, you may be able to prevent it by replacing your above code with the following:

$(".contact").unbind('click').colorbox({width:"600px", height: "420px", inline:true, href:"#send_alert_div"});

Post a Comment for "Colorbox And Preventdefault Not Working Together?"