[jQuery] # or javascript:;
Any way of clearing the focus though(?)? Like you would with the following;
onfocus="if(this.blur)this.blur()"
as it isnt so nice :¬)
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On
Behalf Of hcabbos
Sent: 17 February 2007 03:12
To: discuss@jquery.com
Subject: Re: [jQuery] # or javascript:;
Understood. But all this started with me asking whether to use inline # or
javascript:; for activating a toggle. So my conclusion is if Progressive
Enhancement is what I'm after, I'll use this method:
<script type="text/javascript">
$(document).ready(function(){
$("a#sliderExec").bind('click', function() {
$("div#myElement").toggle("slow");
return false;
});
});
</script>
<a id="sliderExec" href="toggledDivContent.html">my text</a>
If I say the hell with Progressive Enhancement, then I guess this will do:
<script type="text/javascript">
$(document).ready(function(){
$("a#sliderExec").bind('click', function() {
$("div#myElement").toggle("slow");
});
});
</script>
<a id="sliderExec" href="javascript:;">my text</a>
If anyone thinks differently, please speak up now :) I have a headache.
Again, thanks for everyone's assistance.
malsup