Monday, February 13, 2017

jQuery Functions for showing and hidding things with Buttons!

I'd like to use hide() and show() for the Load Data Menu in EISPP.

With respect to, "JavaScript and JQuery: The Missing Manual" by David Sawyer McFarland, page 184:

The jQuery toggle() function is like an on-off switch:

The hide() function is like the big red button in Dr.

The show() function is like the Genesis project from Star Trek:

Now I can look at the code: .

I spy:
          <p class="effect hid" title="show">show('#text')</p>
          <p class="effect vis" title="hide">hide('#text')</p>

as well as stuff like:

switch (action) {
case 'hide' :
case 'show' :;


var vis = $(targID).is(':visible');
$('.effect:contains('+targID+')').each(function() {
var $this = $(this);
if (vis) {
if ($this.hasClass('vis')) {
if ($this.hasClass('hid')) {

No comments:

Post a Comment