Actually, I don't believe that this is necessarily a browser problem. I ahve
dynamic links all 
over a site that use, and previous version of jquery Click() function fired
the link in the same 
manner as a click on the link itself, nothing has changed in my code, and an
upgrade to the 
newest version of jquery no longer does this.  Maybe it was done on purpose,
but either way 
it worked on previous versions on the same browser version. 



Gordon-35 wrote:
> 
> 
> If the anchor you want to fire is inside the div and is the only
> anchor in the div then maybe this might work.
> 
> $('div.test').click (function ()
> {
>     alert ('div.test clicked');
>     $('a', this).trigger ('click');
> });
> 
> On Aug 22, 2:53 am, John  Liu <[EMAIL PROTECTED]> wrote:
>> <html><head>
>> <script language=javascript src="jquery-1.1.3.1.js"></script>
>> <script language=javascript>
>> $(document).ready(function(){
>>   $("div.test").click(function(){
>>      alert('div.test clicked');
>>      $("a").click();
>>   });});
>>
>> </script></head><body>
>>  http://google.com  google  
>> <div class='test'>click</div>
>> </body></html>
>>
>> I have a situation where if anyone clicks anywhere within the div, I
>> want the anchor to be fired - in this case, navigate to google.com.
>> Why doesn't the above code work?
>>
>> thanks in advance.
>> jliu
> 
> 
> 



-- 
View this message in context: 
http://www.nabble.com/divert-click-to-an-anchor-tf4308979s15494.html#a12359923
Sent from the JQuery mailing list archive at Nabble.com.

Reply via email to