Jump to content
Elderberg

OnClick Event Handling to Toggle Class to Active (Post Release13 implementation)

Recommended Posts

I'm trying to implement a responsive Navigation Menu Bar into caspio, which works great outside of Caspio, but i've learned there are some impacted areas as of Release 13.0 as it relates to javascript. 

I've reviewed the link about Release 13.0 Impacted Areas: https://howto.caspio.com/release-notes/caspio-bridge-13-0/13-0-impacted-areas/

and https://howto.caspio.com/datapages/ajax-loading/


Any assistance illuminating the key issue and possible solutions would be great. See below sample snippets i've isolated:

 
[******* html code snippet *******]
<div class="ico-item hidden-on-desktop">
              <button
type="button" class="menu-button js__menu_button fa fa-bars"></button>
</div>

[*******/html code snippet *******]


Below i've isolated the corresponding JS code that performs the desired action.  Can someone help me appreciate the reason this doesn't work when embedded in a datapage? and point me in the direction of a solution?

[*******javascript code snippet *******]

  $(".js__menu_button").on("click", function() {
    $("nav").toggleClass("active");
    return false;
  });

[*******/javascript code snippet*******]

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...