MixitupRails
Adding Mixitup in your rails app. MixItUp - A Filter & Sort Plugin https://mixitup.kunkalabs.com
Installation
Add this line to your application's Gemfile:
gem 'mixitup_rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mixitup_rails
Usage
add in app/assets/javascripts/application.js
after jquery (below jquery)
//= require mixitup
$('#Container').mixItUp(); // an instance now exists in the session memory
Demoapp
open the folder demoapp
to view an example of mixitup app.
$ git clone [email protected]:guinslym/mixitup_rails.git
$ cd mixitup_rails/demoapp
$ bundle install
$ rails s
#open your browser at http://localhost:3000/welcome/index
Issues you may find with turbolink
mixitup-rails-turbolinks and github issues' page link
$(function(){ // on first doc ready we instantiate mixitup
$('#container').mixItUp(); // an instance now exists in the session memory
});
$(window).on('page:before-change', function(){
$('#container').mixItUp('destroy'); // destroy the instance
});
$(window).on('page:load', function(){
$('#container').mixItUp(); // We can now reinstantiate without being blocked
});
Contributing
- Fork it ( https://github.com/guinslym/mixitup_rails/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request