I recently learned that I could do this: height()+100);
So I when I tried to do:
$('.modal1').colorbox.resize({height()+100});
I was confused why that did not work. What I want to do is (if possible, without variables) just add extra 100 pixels to the height, is this possible? Thanks 🙂
Uh, you’re misunderstanding the API.
heightis a method attached to a jQuery object. You’ll have to do something like this:Looking at your code, color-box probably has a special handler for ‘resize’. For each match, we’ll adjust the size using colorbox’s resize. If colorbox doesn’t have a special resize method, use jQuery’s instead. We’ll still use the height from jQuery (or we could use colorbox’s handler for this if it has one).