jquery - Configure a specific JavaScript function to reload on a page -


i trying configure javascript function sort of 'reload' on particular web page. site has overarching js , css framework, want particular function load bit differently.

the js function in js framework sets height of grid element dynamically. example, if have 3 elements have height of 155px, 34px, , 100px, takes element highest value , applies height of grid elements, making them 155px.

for rest of pages in site, code fine because js script executes on page load. however, page i'm using function on doesn't seem adhere js script. still retains differing heights when supposed have same height.

what's different particular page application coded in it. there filtering application in page features search text box , checkbox similar amazon's application filters categories men's or women's clothing. however, unlike amazon, checking/unchecking checkboxes or typing else in search box loads/reloads 'content' page doesn't reload , content links. links loaded separate xml file.

the links in case grid elements. set interactive buttons.

here code js function:

(function ($, window, document, undefined ) {  'use strict';  // add initialisation this.addinitalisation('equal-heights', function() {      this.debug('module: equal heights');      var font = new fontfaceobserver('bentonsansregular');     font.load().then(function () {       // console.log('font available');       $(".grid > .grid-item").matchheight();     }); });  // register ui module this.uimodule({     module: 'equal-heights',     init: function() {         this.initialize('equal-heights');     } });  })( jquery, window, window.document ); 

i didn't upload whole lot of code because seeking understand on how solve problem conceptually (provided clear in explanation of issue).

to iterate goal, want load grid items in particular web page same height after clicking/typing through filter application.

please let me know if can clarify else.

this answer has been solved. did (what worked) take piece of code: $(".grid > .grid-item").matchheight(); , place in javascript file particular web page used. code sets element height dynamically.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -