Thursday 12 November 2015

Using Javascript to create dynamic styling choices

Here's a little bit of code but the use of this goes well beyond just matching up a couple of heights like I have here .

I'll be using posting up some more examples of how to use it for other calculations soon.


 
var rowHeight = $(".views-row-first").height();
            // now to write that value into the css
            $(".offer-cards .match-heights").css("height", rowHeight);
        } 

No comments: