Thanks a lot to both of you. That was really helpfull and got the job
done. I've implemented CSS along with return false. There is no
dynamic content on the site but the above example is great for my
future reference

On Nov 7, 3:01 pm, Flesler <[EMAIL PROTECTED]> wrote:
> I don't see cursor:arrow working as expected, I tested in Firefox 2.
> Here is my solution, it will even work for dynamically added links.
>
> The cursor can be removed by css, that will always be faster than JS..
> just add this
> **********************************************
> a{
>   text-decoration:none;/* no underline */
>   cursor:default; /* arrow cursor */}
>
> **********************************************
>
> As for preventing the default behavior, Andy's solution works fine, if
> you want it to be lighter, and work for dynamic content, then try
> this:
>
> *****************************
> function cancel(e){
>    return e.target.nodeName != 'A' && e.target.parentNode.nodeName !=
> 'A';
>
> };
>
> $('body')
>     .click(cancel)//don't follow the href
>     .mousedown(cancel)//don't focus the link(avoid the dotted square)
>     .mouseover(cancel);//don't show the href in the status bar
>
> ********************************
> That must be enough, you can skip any of the 3 bindings if you are not
> interested in avoiding that specific behavior.
>
> On 7 nov, 15:41, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
>
> > Yes.
>
> > return false won't make the link "unclickable", but it will prevent the
> > default action from occurring. You can do this to also remove the hand
> > cursor:
>
> > $("a").css('cursor','arrow').click(function(){
> >     return false;
>
> > });
> > -----Original Message-----
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> > Behalf Of Bhaarat Sharma
> > Sent: Wednesday, November 07, 2007 12:10 PM
> > To: jQuery (English)
> > Subject: [jQuery] how to make links unclickable
>
> > Hi
>
> > is it possible to make all links on a page un-clickable using jQuery?
> > the mouse cursor shouldn't even change when user hovers over the link.
> > I am new to jQuery
>
> > I'll start out with something like this
>
> > $("a").click(function(){
> >   //what should go here? return false;?
> >  });- Ocultar texto de la cita -
>
> > - Mostrar texto de la cita -

Reply via email to