'$el.offset() is undefined' JS error
-
I’ve been getting this error consistently on pages containing wp-tiles tiles, both via the shortcode and via the_wp_tiles( $query, $args ).
For the moment, I’ve gotten rid of it by taking out the $el.offset() reference in \wp-tiles\assets\js\wp-tiles.min.js:
/* !nasty Hack to avoid JS error!
var tiles = $el.children(“.wp-tiles-tile”),
tileOffsetTop = parseInt($el.offset().top),
max = 0,
newHeight;
*/
var tiles = $el.children(“.wp-tiles-tile”),
tileOffsetTop = 0,
max = 0,
newHeight;Seems to be working OK for now, but I’m worried it might break when I have more tiles on the page.
Any ideas what could be causing this error?
- The topic ‘'$el.offset() is undefined' JS error’ is closed to new replies.