question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

only use on certain trigger divs

See original GitHub issue

Great 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:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
faelsotocommented, Jul 31, 2017

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?

0reactions
nickcomcommented, Aug 2, 2017

thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found