inherit
169267
0
Nov 23, 2024 12:51:41 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Jan 26, 2014 18:10:05 GMT -8
I want to enable and disable my div with a checkbox in my plugin. I'm not sure how to do it though. Can someone help?
|
|
inherit
173855
0
Apr 23, 2024 9:59:44 GMT -8
Texas
I check in every once in a while...
869
November 2011
petermaggio
|
Post by Texas on Feb 5, 2014 19:29:40 GMT -8
$(checkbox).click(function() {
if( $(this).prop('checked') ) {
$(div).show();
} else {
$(div).hide();
}
});
You'll need to replace div & checkbox with selectors that will select your checkbox and div, but that should show the div when the checkbox is checked, and hide it when it's not.
|
|
inherit
169267
0
Nov 23, 2024 12:51:41 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Feb 5, 2014 19:58:37 GMT -8
Thanks Texas I'm using {if selector}{/if} It seems to be working.
|
|
inherit
173855
0
Apr 23, 2024 9:59:44 GMT -8
Texas
I check in every once in a while...
869
November 2011
petermaggio
|
Post by Texas on Feb 6, 2014 7:55:35 GMT -8
Ah, I wasn't sure whether you were using the "javascript" box or the headers footers thing. Glad you figured it out
|
|
inherit
169267
0
Nov 23, 2024 12:51:41 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Mar 10, 2021 6:41:35 GMT -8
TexasThis kind of applies to my first question but what does the selector look like for "online users"? I would like to list them with hide and show when appropriate for a custom page.
|
|