> From: Michael Geary
>
> var $navleft = $("#navleft");
> $navleft.attr( "href", $navleft.attr("href").slice(0,-1) + '0' );
>
> Or even this (which is probably the way I'd code it myself):
>
> var navleft = $("#navleft")[0];
> navleft.href = navleft.href.slice(0,-1) + '0';
I ma
Great, I'm glad you got it working, Steve.
Check out Dan's followup comments for some good ideas on optimizing your
code.
I'd add one more thing to that. I suggest using the $ prefix on variable
names only when you are storing a jQuery object in that variable.
For example:
var $this = $(th
>$("#toggle").click(function(){
>$("#calendar .arc").toggle();
> $("#calendar .arc").Highlight(1000, '#ff9');
>
> var $this = $(this);
> if($this.is ('.show'))
> {
> $this.removeClass('show');
> $this.addClass('hide').empty().appe
Mike,
What I was trying to do was edit the last characer based upon a few
conditions so that a show/hide function would work with and without
javascript.
As well as the errors you spotted, when i was setting the href I was
setting it to #calendar .nav, and not to #calendar #navleft. The
addition
> From: SteelSoftware
>
> I'm having trouble with a bit of jQuery. It seems that if I include
> the following lines into my code, the page follows the link that i'm
> clicking instead of staying on the same page:
>
> var $ref = $("#calendar .#navleft").attr("href").text();
> $("#calendar .nav").
5 matches
Mail list logo