Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Function not being updated correctly Reply To: Function not being updated correctly

#236172
Shikkediel
Participant

I don’t think ready can be used in combination with .on though. But this is an option as well :

$(document).ready(calcLeftWrapper);

Or even :

$(function() {calcLeftWrapper()});

And for the subsequent event listener this is a bit shorter :

$(window).resize(calcLeftWrapper);