Javascript-Equal-Height-Responsive-Rows icon indicating copy to clipboard operation
Javascript-Equal-Height-Responsive-Rows copied to clipboard

Added callback

Open hyunkeln opened this issue 10 years ago • 3 comments

Sometimes the grid isn't created ok, so I added a callback to invoke a function to correct the grid without resizing, I use as follows:

$('.element').responsiveEqualHeightGrid(function(){$(window).resize();});

Cheers!

hyunkeln avatar Jan 22 '15 23:01 hyunkeln

The patch needs to check if "callback" is undefined for people who do not pass in the callback.

Sam152 avatar Jan 23 '15 00:01 Sam152

How about that?

hyunkeln avatar Jan 28 '15 01:01 hyunkeln

Doesn't match coding standards for the rest of the project (need brackets around if statement, space after the "if", 4 space indentation)

"use strict" will throw an error due to non strict check, eg, need to use "!==".

Also, what is the difference between passing a callback in vs calling the plugin then calling a function straight after?

Sam152 avatar Jan 28 '15 03:01 Sam152