jQuery functions.

49 views
Skip to first unread message

Aravind Srivatsan

unread,
Jun 8, 2011, 8:42:18 AM6/8/11
to boxy
jQuery functions to the elements inside the boxy is not working.


$('#register_ln').click(function () {
var reg = '<form name="form1" id="regform" method="post" action="">'
+
'<p><input type="text" id="website"> Website</p>' +
'<p><input type="text" id="email"> Email</p>' +
'<p><input type="submit" id="register" value="Submit"></p>' +
'</form>';
regbox = new Boxy(reg, {title: "Register"});
return false;

});

$('#register').hover(function () {
alert('hi');
});

The above hover function is not working.

Marijan Vukcevich

unread,
Jun 8, 2011, 1:44:58 PM6/8/11
to boxy-...@googlegroups.com
if you move the hover call inside the click function, it's working in Firefox.

Also you can use bind to bind event when you click to do some other logic.

Hope it helps.

<divid="register_ln">Register</div>

<script>
$('#register_ln').click(function(){
varreg ='<form name="form1" id="regform" method="post" action="">'


+
'<p><input type="text" id="website"> Website</p>'+
'<p><input type="text" id="email"> Email</p>'+
'<p><input type="submit" id="register"
value="Submit"></p>'+
'</form>';
regbox = new Boxy(reg, {title: "Register"});

/*


$('#register').hover(function () {
alert('hi');
});

*/
$('#register').bind('mouseover',hoverSubmit);

return false;
});

function hoverSubmit() {
alert('Hello');
}


</script> Regards,
Marijan

});

--
You received this message because you are subscribed to the Google
Groups "boxy" group.
To post to this group, send email to boxy-...@googlegroups.com
To unsubscribe from this group, send email to
boxy-plugin...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/boxy-plugin?hl=en

Reply all
Reply to author
Forward
0 new messages