Git Product home page Git Product logo

Comments (5)

funtoosh avatar funtoosh commented on August 16, 2024

yep, i would like to do the same ;~)
i've got an animation similar to the initial qicksand one running (http://razorjack.net/quicksand/), but would like to not start with all containers visible, but with a selection. how could i bring that about?

thanx for the plugin, btw, absolutely stunning!
cheers from germany, -funtoosh

(PS my current dummy is at weltrettung.org/audiocabbb )

from quicksand.

mansbro avatar mansbro commented on August 16, 2024

I'd love to get an answer to this as well. Having the ability to at least limit the initial number of items returned would help me greatly!

from quicksand.

funtoosh avatar funtoosh commented on August 16, 2024

it was actually quite easy, once i had thought about it: just make two lists, one is initially visible, the other hidden. apply quicksand to both lists (you will want to point quicksand to an UL-class rather than an id). a new list will be built, containing everything you want to see.
(i applied an ".all"-class to all LIs to make them all visible on click.)
hope that helps?
-funtoosh

from quicksand.

cornetjr avatar cornetjr commented on August 16, 2024

Perhaps a slightly more elaborate explanation for the novice coder.

from quicksand.

razorjack avatar razorjack commented on August 16, 2024

Consider this example: http://razorjack.net/quicksand/demos/one-set-clone.html

// DOMContentLoaded
$(function() {

  // bind radiobuttons in the form
  var $filterType = $('#filter input[name="type"]');
  var $filterSort = $('#filter input[name="sort"]');

  // get the first collection
  var $applications = $('#applications');

  // clone applications to get a second collection
  var $data = $applications.clone();

  // INSERT THIS NEW CODEZ!
  $utils = $("#applications").find('li[data-type=util]'); // query line
  $('#applications').html($utils);

And that's it! Pure jQuery, it doesn't involve any Quicksand call. Just replace the query line with any other call that will pick your items that you want to display when the page loads.

from quicksand.

Related Issues (20)

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.