[jQuery] Re: simple onclick visit event on div

2009-02-13 Thread introvert
Thank you, works perfect now! On Feb 13, 5:37 pm, Liam Potter wrote: > sorry, I gave you the wrong syntax, should of been > > $(document).ready(function() { >         $("div.image_single").click(function () { >                 var url = $(this).find("a").attr('href'); >                 window.lo

[jQuery] Re: simple onclick visit event on div

2009-02-13 Thread Liam Potter
sorry, I gave you the wrong syntax, should of been $(document).ready(function() { $("div.image_single").click(function () { var url = $(this).find("a").attr('href'); window.location = url; }); }); introvert wrote: I get an error with the follow

[jQuery] Re: simple onclick visit event on div

2009-02-13 Thread introvert
I get an error with the following code: $(document).ready(function() { $("div.image_single").click(function () { var url = $(this).find("a").attr('href'); window.location(url); }); }); [Exception... "Cannot convert WrappedNative to function" nsresult: "0x8057000d (NS_ERROR_XPC_CANT_CONVERT_WN_TO

[jQuery] Re: simple onclick visit event on div

2009-02-13 Thread Liam Potter
$(document).ready(function() { $("div.somediv").click(function () { window.location(variableName); }); }); introvert wrote: Hello I'd like to put onclick event on simple div and preform action to go to some variable's url. $(document).ready(function() { $("div.somediv")