drop down hover bootstrap

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

drop down hover bootstrap

Joe Guerra
I'm trying to follow this ...

https://github.com/CWSpear/bootstrap-hover-dropdown

and add hover to my drop down menus.  

But, I'm not sure what to do with the javascript in this situation?  Do I add it to the application.js manifest or do I add the requirements in the application.html?

Thanks,
Joe

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6df61ead-8b0b-4ce7-9981-4aefef7d77b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Walter Lee Davis

> On Nov 10, 2017, at 3:53 PM, Joe Guerra <[hidden email]> wrote:
>
> I'm trying to follow this ...
>
> https://github.com/CWSpear/bootstrap-hover-dropdown
>
> and add hover to my drop down menus.  
>
> But, I'm not sure what to do with the javascript in this situation?  Do I add it to the application.js manifest or do I add the requirements in the application.html?

Reading the Usage section of the README, it appears that all you need to do is to add this file to your vendor/assets/javascripts folder, add a reference to this script into your application.js manifest, then add the data-hover="dropdown" attribute either in place of data-toggle="dropdown" or alongside it (so both events cause the dropdown to appear).

If you're adding this to your link with the normal Rails view helpers, then you already have

link_to(nil, 'Account', class: 'dropdown-toggle', data: { toggle: 'dropdown' })

Change that to read

link_to(nil, 'Account', class: 'dropdown-toggle', data: { toggle: 'dropdown', hover: 'dropdown' })

and you're done.

Walter

>
> Thanks,
> Joe
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6df61ead-8b0b-4ce7-9981-4aefef7d77b6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/FF06A317-709E-437F-B63A-17CBC4C9E5F6%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Joe Guerra
ok this is what I tried in one of my menus

<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" role="button" aria-haspopup="true" aria-expanded="false">Categories<span class="caret"></span></a>
<ul class="dropdown-menu">
<% all_categories.each do |category| %>
<li><%= link_to category.name, category_path(category) %></li>
<% end %>
<li role="separator" class="divider"></li>
<li><%= link_to "All Categories", categories_path %></li>
</ul>
</li> I added 'data-hover="dropdown" data-delay="1000"' to the href tag.

On Friday, November 10, 2017 at 4:08:54 PM UTC-5, Walter Lee Davis wrote:

> On Nov 10, 2017, at 3:53 PM, Joe Guerra <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="6mKwbdLUBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jgu...@...> wrote:
>
> I'm trying to follow this ...
>
> <a href="https://github.com/CWSpear/bootstrap-hover-dropdown" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FCWSpear%2Fbootstrap-hover-dropdown\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaiLrK0DDpIJu0UaWa3jPZa3nVRg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FCWSpear%2Fbootstrap-hover-dropdown\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaiLrK0DDpIJu0UaWa3jPZa3nVRg&#39;;return true;">https://github.com/CWSpear/bootstrap-hover-dropdown
>
> and add hover to my drop down menus.  
>
> But, I'm not sure what to do with the javascript in this situation?  Do I add it to the application.js manifest or do I add the requirements in the application.html?

Reading the Usage section of the README, it appears that all you need to do is to add this file to your vendor/assets/javascripts folder, add a reference to this script into your application.js manifest, then add the data-hover="dropdown" attribute either in place of data-toggle="dropdown" or alongside it (so both events cause the dropdown to appear).

If you're adding this to your link with the normal Rails view helpers, then you already have

link_to(nil, 'Account', class: 'dropdown-toggle', data: { toggle: 'dropdown' })

Change that to read

link_to(nil, 'Account', class: 'dropdown-toggle', data: { toggle: 'dropdown', hover: 'dropdown' })

and you're done.

Walter

>
> Thanks,
> Joe
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="6mKwbdLUBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="6mKwbdLUBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
> To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/6df61ead-8b0b-4ce7-9981-4aefef7d77b6%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/6df61ead-8b0b-4ce7-9981-4aefef7d77b6%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/6df61ead-8b0b-4ce7-9981-4aefef7d77b6%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/6df61ead-8b0b-4ce7-9981-4aefef7d77b6%40googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f19f5f74-84a5-4269-9337-f155f2e68c0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Walter Lee Davis
That looks correct. Did it work?

Walter

> On Nov 10, 2017, at 4:16 PM, Joe Guerra <[hidden email]> wrote:
>
> ok this is what I tried in one of my menus
>
> <li class="dropdown">
>   <a href="#" class="dropdown-toggle" data-toggle="dropdown"  data-hover="dropdown" data-delay="1000" role="button" aria-haspopup="true" aria-expanded="false">Categories<span class="caret"></span></a>
>       <ul class="dropdown-menu">
>          <% all_categories.each do |category| %>
>             <li><%= link_to category.name, category_path(category) %></li>
>          <% end %>
>         <li role="separator" class="divider"></li>
>         <li><%= link_to "All Categories", categories_path %></li>
>       </ul>
> </li
> >
>
> I added 'data-hover=
> "dropdown" data-delay="1000
> "' to the href tag.
>
>
>
>
> On Friday, November 10, 2017 at 4:08:54 PM UTC-5, Walter Lee Davis wrote:
>
> > On Nov 10, 2017, at 3:53 PM, Joe Guerra <[hidden email]> wrote:
> >
> > I'm trying to follow this ...
> >
> > https://github.com/CWSpear/bootstrap-hover-dropdown 
> >
> > and add hover to my drop down menus.  
> >
> > But, I'm not sure what to do with the javascript in this situation?  Do I add it to the application.js manifest or do I add the requirements in the application.html?
>
> Reading the Usage section of the README, it appears that all you need to do is to add this file to your vendor/assets/javascripts folder, add a reference to this script into your application.js manifest, then add the data-hover="dropdown" attribute either in place of data-toggle="dropdown" or alongside it (so both events cause the dropdown to appear).
>
> If you're adding this to your link with the normal Rails view helpers, then you already have
>
> link_to(nil, 'Account', class: 'dropdown-toggle', data: { toggle: 'dropdown' })
>
> Change that to read
>
> link_to(nil, 'Account', class: 'dropdown-toggle', data: { toggle: 'dropdown', hover: 'dropdown' })
>
> and you're done.
>
> Walter
>
> >
> > Thanks,
> > Joe
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> > To post to this group, send email to [hidden email].
> > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6df61ead-8b0b-4ce7-9981-4aefef7d77b6%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f19f5f74-84a5-4269-9337-f155f2e68c0c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/A569889F-C5A6-4165-A21E-7D2801CEDE44%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Joe Guerra
No, it didn't work :(

On Friday, November 10, 2017 at 4:23:35 PM UTC-5, Walter Lee Davis wrote:
That looks correct. Did it work?

Walter

> On Nov 10, 2017, at 4:16 PM, Joe Guerra <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="-MiGiJ_VBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">JGu...@...> wrote:
>
> ok this is what I tried in one of my menus
>
> <li class="dropdown">
>   <a href="#" class="dropdown-toggle" data-toggle="dropdown"  data-hover="dropdown" data-delay="1000" role="button" aria-haspopup="true" aria-expanded="false">Categories<span class="caret"></span></a>
>       <ul class="dropdown-menu">
>          <% all_categories.each do |category| %>
>             <li><%= link_to <a href="http://category.name" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcategory.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGmaFBStr6DjfM4786XoprrhBfEnQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcategory.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGmaFBStr6DjfM4786XoprrhBfEnQ&#39;;return true;">category.name, category_path(category) %></li>
>          <% end %>
>         <li role="separator" class="divider"></li>
>         <li><%= link_to "All Categories", categories_path %></li>
>       </ul>
> </li
> >
>
> I added 'data-hover=
> "dropdown" data-delay="1000
> "' to the href tag.
>
>
>
>
> On Friday, November 10, 2017 at 4:08:54 PM UTC-5, Walter Lee Davis wrote:
>
> > On Nov 10, 2017, at 3:53 PM, Joe Guerra <[hidden email]> wrote:
> >
> > I'm trying to follow this ...
> >
> > <a href="https://github.com/CWSpear/bootstrap-hover-dropdown" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FCWSpear%2Fbootstrap-hover-dropdown\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaiLrK0DDpIJu0UaWa3jPZa3nVRg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FCWSpear%2Fbootstrap-hover-dropdown\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaiLrK0DDpIJu0UaWa3jPZa3nVRg&#39;;return true;">https://github.com/CWSpear/bootstrap-hover-dropdown
> >
> > and add hover to my drop down menus.  
> >
> > But, I'm not sure what to do with the javascript in this situation?  Do I add it to the application.js manifest or do I add the requirements in the application.html?
>
> Reading the Usage section of the README, it appears that all you need to do is to add this file to your vendor/assets/javascripts folder, add a reference to this script into your application.js manifest, then add the data-hover="dropdown" attribute either in place of data-toggle="dropdown" or alongside it (so both events cause the dropdown to appear).
>
> If you're adding this to your link with the normal Rails view helpers, then you already have
>
> link_to(nil, 'Account', class: 'dropdown-toggle', data: { toggle: 'dropdown' })
>
> Change that to read
>
> link_to(nil, 'Account', class: 'dropdown-toggle', data: { toggle: 'dropdown', hover: 'dropdown' })
>
> and you're done.
>
> Walter
>
> >
> > Thanks,
> > Joe
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> > To post to this group, send email to [hidden email].
> > To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/6df61ead-8b0b-4ce7-9981-4aefef7d77b6%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/6df61ead-8b0b-4ce7-9981-4aefef7d77b6%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/6df61ead-8b0b-4ce7-9981-4aefef7d77b6%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/6df61ead-8b0b-4ce7-9981-4aefef7d77b6%40googlegroups.com.
> > For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="-MiGiJ_VBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="-MiGiJ_VBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
> To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/f19f5f74-84a5-4269-9337-f155f2e68c0c%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/f19f5f74-84a5-4269-9337-f155f2e68c0c%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/f19f5f74-84a5-4269-9337-f155f2e68c0c%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/f19f5f74-84a5-4269-9337-f155f2e68c0c%40googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ac2e128f-e872-4434-a553-1b5dcb50bbc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Mugurel Chirica
Open the developer console (right click -> inspect in Chrome), and see if you get any related errors.

Alternatively try and use the suggested command from the Readme:
$('.dropdown-toggle').dropdownHover(options);

See if that helps in any way.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL37D8GcAaL6Zi7EFJL2N95dwPu_%3DbeTVwU9t5iATf3gjcF5Og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Joe Guerra
Ok, I got it working.  For some odd reason I couldn't paste that hover javascript file into my javascript folder.
So, I created a new javascript file (using rubymine) and then pasted the actual code into it and saving it with the same name.

I don't know if that's a permissions problem, but it put the file in the root folder of my app (which I've deleted now).

Thanks,
Joe

On Friday, November 10, 2017 at 5:41:17 PM UTC-5, Mugurel Chirica wrote:
Open the developer console (right click -> inspect in Chrome), and see if you get any related errors.

Alternatively try and use the suggested command from the Readme:
$('.dropdown-toggle').dropdownHover(options);

See if that helps in any way.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0d5eb8b5-a6ee-4072-9d05-8bb8bbdb65c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Joe Guerra
hmm,  not so fast.

It is working initially, but once I've clicked on a menu option in the drop down - the hover dropdown stops working.

:(

On Friday, November 10, 2017 at 7:10:51 PM UTC-5, Joe Guerra wrote:
Ok, I got it working.  For some odd reason I couldn't paste that hover javascript file into my javascript folder.
So, I created a new javascript file (using rubymine) and then pasted the actual code into it and saving it with the same name.

I don't know if that's a permissions problem, but it put the file in the root folder of my app (which I've deleted now).

Thanks,
Joe

On Friday, November 10, 2017 at 5:41:17 PM UTC-5, Mugurel Chirica wrote:
Open the developer console (right click -> inspect in Chrome), and see if you get any related errors.

Alternatively try and use the suggested command from the Readme:
$('.dropdown-toggle').dropdownHover(options);

See if that helps in any way.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/aa133e95-0188-4d37-973c-d945952795e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Mugurel Chirica
Did you try the steps I suggested?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL37D8EB%3D_NXHmTnHdBLj0s%2B9iOKmpvSS5y8P3E9rPsyTHx0Tw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Joe Guerra
ok, I just tried $('.dropdown-toggle').dropdownHover(options); and I get ...

VM155:1 Uncaught ReferenceError: options is not defined
    at <anonymous>:1:37

(but the hover drop down is working)...  If I click on a link in the menu

the hover menu stops working, I check the console and I've got plenty of turbo link errors.



On Saturday, November 11, 2017 at 10:26:48 AM UTC-5, Mugurel Chirica wrote:
Did you try the steps I suggested?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1043377a-9cee-41a3-96eb-828fd684911f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Mugurel Chirica
The best place to start is to completely read the Readme section for the plugin you are trying to use, https://github.com/CWSpear/bootstrap-hover-dropdown and after that try again and implement it on your website.

Check the console without the plugin to see if you get any turbo links errors, if you don't get any error proceed with integrating the plugin with your new knowledge from the Readme document.

If it's not working, then check the console again, if you get any new errors you are probably missing something and need to fix those js errors (make sure you check the gem dependencies as well).


ok, I just tried $('.dropdown-toggle').dropdownHover(options); and I get ...
VM155:1 Uncaught ReferenceError: options is not defined
    at <anonymous>:1:37

Yes, that's true because I gave you the example from the Readme, you need to customise it for your code.

$('YOUR_CLASS').dropdownHover({YOUR_OPTION: VALUE});
Ex: $('.dropdown-toggle').dropdownHover({delay: 5000});

This will tell you if the JavaScript implementation was correct, if you can't make that work in the console it's probably that.


After following all of the above steps you still can't make it work, I'll ask for more details and try and help you get it working.

Cheers

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL37D8EZPA59_db42OAoADp136WRgM13VKrFkC8-hrnz25U4oQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Joe Guerra
Ok, I just discovered if I reload the page hover will work.

Not sure why it's not totally reloading the page after menu items have been click (while hover is working).

On Saturday, November 11, 2017 at 11:05:48 AM UTC-5, Mugurel Chirica wrote:
The best place to start is to completely read the Readme section for the plugin you are trying to use, <a href="https://github.com/CWSpear/bootstrap-hover-dropdown" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FCWSpear%2Fbootstrap-hover-dropdown\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaiLrK0DDpIJu0UaWa3jPZa3nVRg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FCWSpear%2Fbootstrap-hover-dropdown\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGaiLrK0DDpIJu0UaWa3jPZa3nVRg&#39;;return true;">https://github.com/CWSpear/bootstrap-hover-dropdown and after that try again and implement it on your website.

Check the console without the plugin to see if you get any turbo links errors, if you don't get any error proceed with integrating the plugin with your new knowledge from the Readme document.

If it's not working, then check the console again, if you get any new errors you are probably missing something and need to fix those js errors (make sure you check the gem dependencies as well).


ok, I just tried $('.dropdown-toggle').dropdownHover(options); and I get ...
VM155:1 Uncaught ReferenceError: options is not defined
    at <anonymous>:1:37

Yes, that's true because I gave you the example from the Readme, you need to customise it for your code.

$('YOUR_CLASS').dropdownHover({YOUR_OPTION: VALUE});
Ex: $('.dropdown-toggle').dropdownHover({delay: 5000});

This will tell you if the JavaScript implementation was correct, if you can't make that work in the console it's probably that.


After following all of the above steps you still can't make it work, I'll ask for more details and try and help you get it working.

Cheers

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8e19cf61-ee40-4ca3-947b-a420aa91939a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: drop down hover bootstrap

Walter Lee Davis
That's a signal that you are not reloading something via TurboLinks that you expect to be there. When a full page reload makes it work again, that means that something JS related in the page needs to observe the event 'turbolinks:load' rather than just the page:load.

document.addEventListener("turbolinks:load", function() {
  // ...
});

Walter

> On Nov 11, 2017, at 1:51 PM, Joe Guerra <[hidden email]> wrote:
>
> Ok, I just discovered if I reload the page hover will work.
>
> Not sure why it's not totally reloading the page after menu items have been click (while hover is working).
>
> On Saturday, November 11, 2017 at 11:05:48 AM UTC-5, Mugurel Chirica wrote:
> The best place to start is to completely read the Readme section for the plugin you are trying to use, https://github.com/CWSpear/bootstrap-hover-dropdown and after that try again and implement it on your website.
>
> Check the console without the plugin to see if you get any turbo links errors, if you don't get any error proceed with integrating the plugin with your new knowledge from the Readme document.
>
> If it's not working, then check the console again, if you get any new errors you are probably missing something and need to fix those js errors (make sure you check the gem dependencies as well).
>
>
> ok, I just tried $('.dropdown-toggle').dropdownHover(options); and I get ...
> VM155:1 Uncaught ReferenceError: options is not defined
>     at <anonymous>:1:37
>
> Yes, that's true because I gave you the example from the Readme, you need to customise it for your code.
>
> $('YOUR_CLASS').dropdownHover({YOUR_OPTION: VALUE});
> Ex: $('.dropdown-toggle').dropdownHover({delay: 5000});
>
> This will tell you if the JavaScript implementation was correct, if you can't make that work in the console it's probably that.
>
>
> After following all of the above steps you still can't make it work, I'll ask for more details and try and help you get it working.
>
> Cheers
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8e19cf61-ee40-4ca3-947b-a420aa91939a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/FCF20334-E885-4F8B-AE57-7A63545984A4%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.