Friday, 15 May 2015

javascript - Prevent a standard a href/jquery click combo from appending # to the url? -



javascript - Prevent a standard a href/jquery click combo from appending # to the url? -

i have standard link setup fires event via jquery when clicked

<a href="#" class="dosomething">click me</a>

all works great, except when pseudo url clicked, appends hashtag (#) url. hashtag affects how page reloads if user decides refresh page later on, i'd not have hashtag appended url.

is possible while still allowing normal jquery fire?

thanks!

does need href @ all? do:

<span class="dosomething">click me</span>

.

.dosomething{cursor:pointer}

javascript jquery hyperlink

No comments:

Post a Comment