jQuery Selector based on Checkbox Values
I have a page that contains a checkbox page item and many other elements that contain an attribute named "profile" that may have a value like <div profile="A B C D">. What I would like to be able to do is when a user checks/unchecks a box, to have the page only show elements that match the checked values of the page item against the "profile" attribute. For example, if the user checks boxes A & C but not B & D, it would produce a selector string like:
div[profile~="A"][profile~="C"]
I'm using a Dynamic Action that triggers the show/hide behavior using the jQuery Selector option, but I'm not sure how to structure the jQuery Selector to pass in an item value or how to have it match multiple item values. Is this doable through a dynamic action or do I need to do all this through JavaScript?
Thanks,
Jeff
Edited by: jritschel on Jun 11, 2011 8:49 AM
Edited by: jritschel on Jun 11, 2011 9:11 AM