[jQuery] Re: How to make hyperlink failed

2009-02-08 Thread Geuis

I think you're asking, how do you prevent a link from doing anything
when the browser has javascript enabled.

$('#xxx').click(function(){
//your stuff
return false;
}

On Feb 8, 11:22 pm, David .Wu chan1...@gmail.com wrote:
 If I got a hyperlink a href=http://xxx.com; id=xx/a

 $(function() {
         $('#xxx').click(function() {
         .
         ..//do something
         });

 })

 I want to make the link doing something if browser opened javascript,
 and if not, it go to the page it referred.


[jQuery] Re: How to make hyperlink failed

2009-02-08 Thread David .Wu

yup, that's what I want, thank you very much.

On 2月9日, 下午3時27分, Geuis geuis.te...@gmail.com wrote:
 I think you're asking, how do you prevent a link from doing anything
 when the browser has javascript enabled.

 $('#xxx').click(function(){
 //your stuff
 return false;

 }

 On Feb 8, 11:22 pm, David .Wu chan1...@gmail.com wrote:

  If I got a hyperlink a href=http://xxx.com; id=xx/a

  $(function() {
  $('#xxx').click(function() {
  .
  ..//do something
  });

  })

  I want to make the link doing something if browser opened javascript,
  and if not, it go to the page it referred.