Hey all, I haven't had time to test but reading elsewhere it seems
is(':visible') is the way to go.
Thanks for the replies.
Adrian
On Jul 25, 7:24 am, Stephan Beal <[EMAIL PROTECTED]> wrote:
> On Jul 24, 5:25 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
>
> > $("p").toggle(function(){
> > $(th
On Jul 24, 5:25 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> $("p").toggle(function(){
> $(this).addClass("selected");
> someVar = true;},function(){
>
> $(this).removeClass("selected");
> someVar = false;
>
> });
Instead of setting someVar, can't $(element).is("selected") be used?
I thought of something similar, but I wasn't sure if the toggle is hiding
anything.
The question didnt specify.
Glen
On 7/24/07, Ganeshji Marwaha <[EMAIL PROTECTED]> wrote:
a simple solution that i could think of is
$("mySelector").is(":visible");
This should return true if your element is v
a simple solution that i could think of is
$("mySelector").is(":visible");
This should return true if your element is visible and false otherwise.
Untested though
-GTG
On 7/24/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
First thing that comes to mind is to set a variable inside the two sides
First thing that comes to mind is to set a variable inside the two sides of
the toggle.
$("p").toggle(function(){
$(this).addClass("selected");
someVar = true;
},function(){
$(this).removeClass("selected");
someVar = false;
});
Glen
On 7/24/07, Adrian Lynch <[EMAIL PROTECTED]> wrote:
H
5 matches
Mail list logo