Thanks to everyone for really helpful insights into my question. I've
witnessed '#' and 'javascript:;' being used in JQuery examples, so I was
curious as to a recommended method. I'm a newbie to JQuery. With that said,
Kenneth-35 makes a good point...

"IE doesn't treat  's as links unless they have an href attribute [no
:hover, text-decoration, etc]"

...which is exactly what prompted my initial post. Taking 'href' out strips
my text links of any styles which is obviously what I don't want. I'm seeing
this also in Firefox and not just IE. So in the case of a link that isn't
going anywhere but is just meant to toggle a div, what's your
recommendation? The following works but is it correct based on:

1) the unobtrusive scripting paradigm
2) proper way of coding in JQuery

<script type="text/javascript">
$(document).ready(function(){
        $("a#sliderExec").attr({ href: "javascript:;"});
        $("a#sliderExec").click(function(){
                $("div#myElement").toggle("slow");
                return false;
        });
});
</script>

slide up/down 

And can you answer one more thing. Why is it that href isn't shown when I
view the source code in my browser but it shows up when inspecting the code
in Firebug? My understanding is that it would get appended to   on loading
of the page.
-- 
View this message in context: 
http://www.nabble.com/--or-javascript%3A--tf3241319.html#a9015385
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to