Cool! Thanks
On Aug 28, 12:38 am, Dan Evans <[EMAIL PROTECTED]> wrote:
> One reason why the others may not have worked is because .toggle()
> assigns a click handler to an element. It is the same as
> writing .click() except that it takes two functions instead of one and
> it alternates them. So
One reason why the others may not have worked is because .toggle()
assigns a click handler to an element. It is the same as
writing .click() except that it takes two functions instead of one and
it alternates them. So the original way it's written says, "When the
user clicks this thing add a new c
voltron schrieb:
Hi all,
I am toggling an element using A tags, I would like the A tag to
display "Show" or "Hide" depending on the state. my proble is, I
cannot get this to work properly:
toggle is click, see:
$('#toggleTwo').toggle(function(){
$('#rubricTwo').hide();
thanks for the heads up Dan! I modified your code and it worked, you
missed out the part that really hides and shows the element:
$(document).ready(function(){
$('#toggleTwo').toggle(function(){
$('#toggleTwo').html('hide');
$('#rubricTwo').hide();
How about instead of putting a .toggle() inside a .click() just use
a .toggle()? Something like this:
$(document).ready(function(){
$('#toggleTwo').toggle(function(){
$('#rubricTwo').html('hide');
return false;
}, function(){
$('#ru
Very strange, that does nor work either Klaus. I am using 1.1.3, maybe
it´s a Jquery version problem? Toggle works when I remove both
arguments and leave it empty.
Thanks
On Aug 27, 9:56 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> Benjamin Sterling wrote:
> >
> >$(document).ready(function(
Thanks for the reply Benjamin, sadly, the solution does not work,
strangely, FireBug does not state any errors. Any other idea?
Thanks again
On Aug 27, 8:54 pm, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
>
>$(document).ready(function(){
>
>$('#toggleTwo').click(function(){
> va
Strange, my posts are not showing up. Well here goes. I tried both
methods, and both don' t work, could it be a biug with the Jquery
version? I am using 1.1.3. Firebug does not state any errors and when
I remove both values for the toggle function, it works.
Any other ideas? Thanks
On Aug 27, 10
Is there a reason to put the .toggle() inside a .click()?
Why not?
$(document).ready(function(){
$('#toggleTwo').toggle(function(){
$('#rubricTwo').html('hide');
return false;
}, function(){
$('#rubricTwo').html('show');
Ahh good catch Klaus!
On 8/27/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
>
> Benjamin Sterling wrote:
> >
> >$(document).ready(function(){
> >
> >$('#toggleTwo').click(function(){
> > var $this = $(this); // add a reference to "this" relating to the A tag
> > $('#rubricTwo').to
Benjamin Sterling wrote:
$(document).ready(function(){
$('#toggleTwo').click(function(){
var $this = $(this); // add a reference to "this" relating to the A tag
$('#rubricTwo').toggle(function(){
$this.html = "hide";} ,function(){$this.html ="show";}
);// end toggle
$(document).ready(function(){
$('#toggleTwo').click(function(){
var $this = $(this); // add a reference to "this" relating to the A tag
$('#rubricTwo').toggle(function(){
$this.html = "hide";} ,function(){$this.html ="show";}
);// end toggle
return false;
12 matches
Mail list logo