I encountered a use case where we needed all the links in a specific container AJAX-ified ... but not a few of them. Since the triggers are just jQuery selectors, we're able to do that with some selector magic. Unfortunately, there are cases where selectors won't work including links like contextual links which are in the container we are selecting.
As an example, if you have #main a
as a selector, this will select contextual links. But with the patch below you can remove contextual links from the selected elements by adding !.nav a
. The "negative trigger" is then removed from selected elements using jQuery's .not method.
Comment | File | Size | Author |
---|---|---|---|
ajax_links_api_support_negative_triggers.patch | 6.95 KB | rballou |
Comments
Comment #1
serjas CreditAttribution: serjas commentedgood work @rballou , i will test and commit to dev branch
Comment #2
serjas CreditAttribution: serjas commented@rballou, perfect patch, only thing i had to do was commit :) Thanks
Committed to 7.x-1.x-dev . Please test and confirm :)
Comment #3
serjas CreditAttribution: serjas commentedComment #5
serjas CreditAttribution: serjas commentedComment #6
serjas CreditAttribution: serjas commented