Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 83135

HTMLSnippet Jquery only works for one page, on the first load

$
0
0
Hi all, Myself and a colleague are getting a bit stumped with a jquery problem in our app. We have a number of pages that use List views to show data. Each entry shows a styled block, and we want a JS action to trigger every time a user clicks on a button, to dropdown a block below it with some more information The function, we're including in a HTMLSnippet; $('.accordian-button').click(function(){ $(this).toggleClass('fa-arrow-down fa-arrow-up'); $(this).closest('.brick-body').siblings('.brick-expand').toggleClass('details-not-visible details-visible '); }); When we load our first page in with this function in the page, it works fine. However, if we navigate away to another page with this function, or away then back to the same page, it stops working entirely. No class toggle, so no style change. Has anyone encountered this problem before, any workarounds? Cheers Luke

Viewing all articles
Browse latest Browse all 83135

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>