Thursday 15 January 2015

performance - jQuery filtrify with pagination, is it possible not to load hidden elements? -


I am using this jquery solution to filter my content (with jpages and lazyload) -

This works very well, but when I used more than 50 elements, I noticed some recession that this work works fast after the page has been loaded, but the page loads for a while is.

I have to find out that there is a way to stop loading elements (in this case the divis) which are not visible?

Can it be achieved with jquery?

Using the last code

  $ (function () {var container = $ ("# item listing"), marking on page = $ ("# Pane "); Function Set Lowell Load () {Container.Fund (" IMG "). Allialroll ({Event:" Turnpages ", Effect:" Feedin "});}," A.jprev ", Next: "A.jnext", "fadeInUp", previous: "a.jnext", "f" callback: function (pages, items) {items.showing.find ("img"). Trigger ("turnpage"); items. Noning.fand ("img"). Trigger ("turnpage");}}}}; Functions piping () {pagination.jpages ("destroyed");} Settleyge Laud (); Setgiven (); Var ft = $. Filter ("item list leading", "placeholder", {close: true, // close windows select tag block: "data-origin", callback: function (query, match, mismatch) {if (Mismatch.length) $ ("div # reset"). Show (); // Reset the second show $ ("div # reset"). Hide (); $ ('.ft-label') .Parent ) // Hide unrelated tags ('li [data-count = 0]'). Hide (). End (). Find (': no ​​[li. [Data -count = 0])') show () end (). $ (".ft- selected"). CSS ("display", "inline-block"); // delete short tag display; pagination (); SetPagination ();}}); $ ("Div # Reset duration"). Click (function () {// Reset button to be clickable ft.reset ();}); });    

Try it, not sure it can apply in your case:

  $ (function () {$ ('div: hidden'). Remove (); var container = $ ("# itemListLeading"), ...});    

No comments:

Post a Comment