Skip to content
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

Support for for multiple elements without an inner wrapper #9

Open
ianchouinard opened this issue May 1, 2018 · 0 comments
Open

Support for for multiple elements without an inner wrapper #9

ianchouinard opened this issue May 1, 2018 · 0 comments

Comments

@ianchouinard
Copy link

ianchouinard commented May 1, 2018

I'm finding it difficult to use this plugin for alot of cases I have in my markup for a project I'm doing.
In my html, I have some server side generated html like this....

<div class="items">
    <div class="item-to-hover">.....</div>
    <div class="item-to-hover">.....</div>
    <div class="item-to-hover">.....</div>
</div>

For layout and design reasons, I don't want an inner div on the "item-to-hover" divs. This prevents me from using this plugin because if I do the following, all of the items in "items" hover at the same time...
$(".items").hover3d({ selector: ".item-to-hover" });

I can fix this locally by editing the plugin on line 30 to be
$card = settings.selector ? $(this).find(settings.selector) : $(this);

Now I can just do the following without needing to specify a selector option
$(.item-to-hover).hover3d();

Which seems to solve my problem, but I'm wondering if there is a built in option that does this that I'm not aware of, or if this will cause an issue I haven't thought of.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant