What your wanting is really unclear, at least to me. The answers you've gotten are right, in that if you want the href
attribute to be empty, you don't use hide. But here is where I'm confused:
You already have display:none
set for that <a>
, so that means it won't appear at all. So how is a user going to click on something they can't interact with?
You are wanting to "hide" the <a>
AFTER it gets clicked. If I had to guess you either want to:
a. Make the link (with the 2 that's showing) go away after the user clicks it, or
b. You want the user to only click on the link once, and after that, it becomes a dead link because it doesn't point to anything.
So, assuming I have the faintest idea of what you are going for, to make the link dead on click, follow the advice already given
$('a.minimize').click(function() {
$(this).attr('href', '');
});
If you want the link to evaporate on click, go with:
$('a.minimize').click(function() {
$(this).hide();
});
Or am I totally missing the point?