only use on certain trigger divs
See original GitHub issueGreat plugin.
Just wondering how I can selectively target multiple containers to have this functionality.
Lets say my app has a UI as follows: page 1) landing page with a list of products page 2) detail view of list of products (open when user clicks on list from page 1) page3) list of colour options for the product (opened from a button within page 2)
Lets say I want the pulltorefresh function on the list in page 1 and in page 3, but it shouldn’t work on page 2.
I can’t seem to enter multiple selectors in the mainElement
option. I also notice multiple css tags are ignored (for example setting mainElement: 'body.page1, body.page2'
doesn’t work.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Allow surrounding div's click event only to trigger when ...
As you can see, I am trying to surround a checkbox + label with a div, and apply a click-event to the div,...
Read more >hx-trigger
hx-trigger. The hx-trigger attribute allows you to specify what triggers an AJAX request. A trigger value can be one of the following:.
Read more >JavaScript
Varying modal content based on trigger button. Have a bunch of buttons that all trigger the same modal, just with slightly different contents?...
Read more >.one() | jQuery API Documentation
A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the...
Read more >When a Click is Not Just a Click
The click event is quite simple and easy to use; you listen for the event and run code when the event is fired....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey!
That seems like a very specific use case that can be solved by adding a class to those pages, rather than using multiple classes. Maybe you can add a
body.pull-to-refresh
class to those pages?thanks!