i need help with this JQuery code i have.. i’m still a newbie when it comes to JQuery but i have alot of codes here to test with.. you know just incase you need one so here’s the code..
<script type="text/javascript">
//onload popup
$(function()
{
$(window).bind('load',
function(e)
{
$.colorbox({opacity:0.3, href:"ext/popup.php"});
});
});
</script>
now this time i don’t want to load the page then let the form popup.. i wan’t something to click like a link.. any suggestions?
And create a link like this
Update
If you want to apply this logic to multiple links you should use a class instead of an id
and for the jquery target them with
Comment
A generic comment on your code, you do not need to use
$(function(){..})and$(window).bind('load'.The first part binds an event on the DOM ready. and the second on the DOM load.
Since the
loadwill always come after thereadyevent you can directly doBut the load should only be used when you need the sub-elements to have been completely loaded before running your code (usually images).
read: http://api.jquery.com/load-event/