All Projects → bodrovis → Jquery Slick Rails

bodrovis / Jquery Slick Rails

Licence: mit
Integrates Slick carousel, a jQuery plugin, into your Rails app.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Jquery Slick Rails

Play Slick3 Example
A simple skeleton for play scala slick applications.
Stars: ✭ 83 (-6.74%)
Mutual labels:  slick
Rails React Boilerplate
Ruby on Rails, React, Webpack 4 boilerplate app.
Stars: ✭ 86 (-3.37%)
Mutual labels:  rails
Simpleadmin Rails
SimpleAdmin - Dashboard for modern website without wasting time
Stars: ✭ 87 (-2.25%)
Mutual labels:  rails
Embedding Reference Apps
Reference applications for common web frameworks showing how to embed Metabase charts
Stars: ✭ 83 (-6.74%)
Mutual labels:  rails
Stimulus reflex expo
StimulusReflex demos
Stars: ✭ 85 (-4.49%)
Mutual labels:  rails
Pager Api
Easy API pagination for Rails
Stars: ✭ 86 (-3.37%)
Mutual labels:  rails
Tui.calendar
🍞📅A JavaScript calendar that has everything you need.
Stars: ✭ 9,537 (+10615.73%)
Mutual labels:  jquery-plugin
Errdo
A simple plugin to handle, log, and customize production errors in Rails applications
Stars: ✭ 88 (-1.12%)
Mutual labels:  rails
Chaskiq
A full featured Live Chat, Support & Marketing platform, alternative to Intercom, Drift, Crisp, etc ...
Stars: ✭ 1,263 (+1319.1%)
Mutual labels:  rails
Covid Volunteers
Organizing and matching volunteers with COVID-19 projects
Stars: ✭ 87 (-2.25%)
Mutual labels:  rails
Thredded
The best Rails forums engine ever.
Stars: ✭ 1,263 (+1319.1%)
Mutual labels:  rails
Graphjin
GraphJin - Build APIs in 5 minutes with GraphQL. An instant GraphQL to SQL compiler.
Stars: ✭ 1,264 (+1320.22%)
Mutual labels:  rails
Promoslide
jQuery plugin for promotional content that appears with user scrolling
Stars: ✭ 86 (-3.37%)
Mutual labels:  jquery-plugin
Jbox
jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.
Stars: ✭ 1,251 (+1305.62%)
Mutual labels:  jquery-plugin
Popup Maker
Popup Maker plugin for WordPress
Stars: ✭ 87 (-2.25%)
Mutual labels:  jquery-plugin
Pluck all
A more efficient way to get data from database. Like #pluck method but return array of hashes instead.
Stars: ✭ 83 (-6.74%)
Mutual labels:  rails
Rails or
Cleaner syntax for writing OR Query in Rails 5, 6. And also add #or support to Rails 3 and 4.
Stars: ✭ 86 (-3.37%)
Mutual labels:  rails
Muvee
μv: (mew-vee) Netflix, for your home. WIP
Stars: ✭ 89 (+0%)
Mutual labels:  rails
Instuigram
🎓 Learning Ruby on Rails through building the Instagram Application.
Stars: ✭ 88 (-1.12%)
Mutual labels:  rails
Csso Rails
CSS Optimizer(csso) ruby wrapper for Rails Asset pipeline
Stars: ✭ 86 (-3.37%)
Mutual labels:  rails

jQuerySlickRails

Gem Version Build Status

A ruby gem that uses the Rails asset pipeline to include the jQuery Slick plugin by Ken Wheeler (https://kenwheeler.github.io/slick/).

Installation

Add this line to your application's Gemfile:

gem "jquery-slick-rails"

And then execute:

$ bundle

Or install it yourself as:

$ gem install jquery-slick-rails

NOTE: this is a jQuery plugin so you will also need the jquery-rails gem (it is not added by default starting from Rails 5.1):

Usage

You will need to add this line into your application.js:

//= require jquery.slick

Then into application.scss:

@import 'slick';

or into application.css:

/*
*= require slick
*/

Starting from version 1.4.0 Slick provides an optional theme, so if you want to employ default styling, include the following line into application.scss:

@import 'slick-theme';

or into application.css:

/*
*= require slick-theme
*/

You may use this simple Rails app as an example (it also shows how to use the plugin with Turbolinks).

Turbolinks Gotcha

If you are using Slick with Turbolinks, you might run into some problems with the browser's "back" button. If that happens, the following solution might help. Add this code to your layouts/application.html.erb:

<head>
  <% if content_for?(:head) %>
    <%= yield(:head) %>
  <% end %>
</head>

And then on any page that has Slick:

<% content_for :head do %>
  <meta name="turbolinks-cache-control" content="no-cache">
<% end %>

The idea is that we are opting the page out of caching, as Turbolinks uses it during restoration visits (that is, when you click "back").

Another solution was to employ the unslick method to prepare your document before Turbolinks caches it:

jQuery(document).on('turbolinks:before-cache', $('.scroller').slick('unslick'))

    However, this does not seem to work anymore - maybe because Slick has lots of opened issues related to unslick.

Read more on StackOverflow.

Testing

Run

$ bundle install

and then

$ rake test

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Make sure tests are passing
  4. Commit your changes (git commit -am 'Added some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

License

This plugin is licensed under the MIT License.

Copyright (c) 2017 Ilya Bodrov

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].