-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jquery closest/find selector support #56
Comments
oops descendant |
You mean like this? Works fine.
|
I have the same problem. In my opinion intercooler relies too heavily on defining unique global ids for DOM elements. This may work for small examples but not for complex cases where you may have lots of the same ajax components on the same page. In my option all selectors used in Intercooler attributes should per default not be global but restricted to the children of the current element. And only if you really want to have a global selector you could put the keyword "global" in front of the selector. Another thing which really frustrates me is that not all selectors are handled equally e.g. I can use "closest" on ic-target but not on ic-indicator. |
In doc you can read "attribute should be a valid global CSS/JQuery selector OR the string closest followed by a space, followed by a valid CSS selector, which will be evaluated as the closest parent matching the given selector". |
Yes but that is not my point. My point is that I want not a global selector ( |
Can you use "closest" reserved word (eg "closest div.modal-content")? |
Why not post a codepen sample? |
This is my case http://codepen.io/anon/pen/avRrbe Its just the markup. My problem is that this is a component which is in use multiple times on the page and I don't want to create artifical unique id attributes for |
@webholics, i don't understand well what is your problem, but if you have multiple ".voting" blocks, everyone with its progress, take a look at http://codepen.io/anon/pen/rOqgeb (css is only for sample). |
Hi webholics. I can see your point, generating unique IDs in repeated UX is ugly and annoying. It seems like a sane algorithm would be to try the selector first as a find() from the current element, then as a global selector. I will try to get something along those lines in the next release. |
sometimes in list items it is helpful to have a descentant class selector for target instead of id , something like ic-target ="find .description"
The text was updated successfully, but these errors were encountered: