Prevent Add URL Binding

I have a tabbed window that when I click on the tab, "# div1" is added to the end of my URL. Is there a way to prevent jQuery from executing?

I still can't get it to work. I made a violin ...

http://jsfiddle.net/k6Ks8/

+5
source share
2 answers

Of course, event.preventDefault()this is what you are looking for.

http://api.jquery.com/event.preventDefault/

+11
source

Easy

    $(function(){
        $('a[href="#"]').click(function(event){
            event.preventDefault();
        });
    });
+1
source

All Articles