Code Monkey home page Code Monkey logo

isotopesearchfilter's Introduction

isotopeSearchFilter jQuery plugin

This is a super-light jQuery plugin that combines internal page search functionality with the Isotope plugin

Demo:

http://benrlodge.github.io/isotopeSearchFilter/

How to Use:

Load up the isotope plugin, then chain on isotopeSearchFilter().

If your sorting containers use images, I recommend David DeSandro's imagesloaded.

  $(document).ready(function(){
    var $container = $('.item-container')
    
    $container.isotope({
      itemSelector: '.item',
      layoutMode: 'fitRows' 
    }).isotopeSearchFilter();

  })


  // With imagesLoaded:

  $(document).ready(function(){
    var $container = $('.item-container')
    
    imagesLoaded( '.item-container', function() {
      $container.isotope({
        itemSelector: '.item',
        layoutMode: 'fitRows' 
      }).isotopeSearchFilter();
    });
  })    

Available Options:

  isotopeSearchFilter({
    itemsContainer: ".item-container",
    itemSelector: ".item",
    filtersSelector: ".filters",
    searchResultsClassSelector: ".active",
    inputSearch: '#search-term'
  })

Dependencies

Related Plugins:

isotopeDropdownFilters:

https://github.com/benrlodge/isotopeDropdownFilters

This is a jQuery plugin that makes it easy to incorporate dropdowns and multi-select filtering using the Isotope plugin.

Contributions:

PRs and feature requests are welcomed. If you wish to contribute please make updates in the coffee file.

isotopesearchfilter's People

Contributors

benrlodge avatar tvaliasek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

isotopesearchfilter's Issues

Select wich content is open for search?

I have a teaser with image, title, short description and recent comment. I would like the search to only look for a match inside the title and short description. These fields i give a class 'searchable'.

filtersSelector: ".searchable"

The plugin doesn't hide an item if there is a match inside a tag that does not have the .searchable class. In the code example below, the search "Name Surename" would have a match, but this tag does not have the ".searchable" class.

What im i doing wrong?
Is there more documentation about the plugin options?

<div class="isotope-item">

   <div class="image-wrapper">
      <img src="images/default/bg3.jpg" alt="">
   </div>

   <div class="info">
      <h2 class="title searchable">Lorem Ipsum Dolor Aside kenneth</h2>
      <p class="description searchable">Nullam quis risus eget urna mollis.</small>
   </div>

   <div class="comment">
      <p>Name Surename</p>
      <p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
   </div>

</div>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.