Closed fluke closed 11 years ago
Unfortunately its on local server. I'm using Bootstrap and I've used centerHorizontal on the nav.
Make sure that the element is being centered is set to display: inline; The midway.js file automatically adds that, but sometimes the users CSS can override it.
I made a change and it started working. Don't understand why it works now.
I changed: $(window).load(function() { Midway(); $(window).on('resize', Midway); });
to
$(window).load(function() { Midway(); $(window).on('resize', Midway); Midway(); });
Hm yeah that's weird, I will look into this more, and why that made it work. Glad you got it sorted nonetheless.
Just to answer your previous question. Display:inline was set on the element. And I found that Midway wasn't working on it's first try but after resizing it worked. So I tried calling it twice just in case running twice was the issue. And it worked.
Out of curiosity, why do you have your onresize listener nested within your onload?
Can you give me a link to where the problem is please?