Hassan Schroeder wrote in post #1165339:
> On Wed, Dec 24, 2014 at 10:06 AM, David Williams <lists@ruby-forum.com>
> wrote:
>> The javascript is not working for 'owlcarousel-rails' plugin.
>
> Disclaimer: never heard of this plugin, but ---
>
>> $(".owl-carousel").owlCarousel();
>
> if you're calling that method *before* any such elements exist in the
> DOM, I'd expect exactly nothing to happen :-)
>
> Have you looked at the JS console/log to see if there are errors?
>
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
I'll try to call it after div code block, and then see if the function
fires off.
<div class="row">
<div class="large-12 medium-12 small-2 columns mid-index-bg">
<h2 style="color: red; text-align: center;">Carousel
Placeholder</h2>
<div class="owl-carousel" style="z-index: 1;">
<div class="item"><%= image_tag 'Photo1'%</div>
<div class="item"><%= image_tag 'Photo2'%></div>
</div>
</div>
</div>
--
Posted via http://www.ruby-forum.com/.
--
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-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8cc8c5b95da96ae19fc0f2baf1c2c3c0%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment