Open justinbhayes opened 6 years ago
Yes you can do that using jQuery trigger like this: jQuery('.gridder . gridder-list:nth-child(2)').trigger('click'); // This will select the second child of the list a trigger the opening. Cheers, Orion.
On 7 October 2017 at 01:22, Justin notifications@github.com wrote:
Can you add the ability to target a specific element within the gridder list as the trigger to open the gridder content/show area?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/oriongunning/gridder/issues/57, or mute the thread https://github.com/notifications/unsubscribe-auth/AE2BxDkDV3zsboB8U5KLLPHKAipD2lFTks5spjepgaJpZM4Pwjp7 .
-- Orion GUNNING Tél. : 04 35 30 75 13 http://www.orion3d.fr/
Thanks for the quick reply. I should have been more specific. I want to remove the regular trigger and then add a new one. For example, I only want clicking "Member Title #" to trigger the associated gridder content. https://is.gd/C6Il4M
Ideally I would like to change the selector for the click event, but that isn't working.
_this.on("click", ".gridder-list h4", function (e) { e.preventDefault(); var myself = $(this); openExpander(myself); });
I assume the following line needs to be updated to target it's parent .gridder-list?
var myself = $(this);
I was able to get my gridder functioning the way I wanted with this update.
_this.on("click", ".bio", function (e) { e.preventDefault(); var myself = $(this).closest("li"); openExpander(myself); });
Can you add the ability to target a specific element within the gridder list as the trigger to open the gridder content/show area?