Dan
unread,Sep 7, 2010, 2:08:56 AM9/7/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jixedbar
hey everybody,
for some reason or other when I would resize the page, the
jixedbar div would no longer be centered, and would float to the
right. it worked fine in the demo package however, so i first tried
eliminating all non-essential JS and CSS to rule out the source of the
problem, but to no avail...
I didn't feel like going thru 100,000 lines of code, so I wound
up just rearranging some code and creating a different resize event
handler that worked outside the jixedbar function. if anyone else has
the same problem, this might be of use to you.
all I did was remove the window resize event handler from line 30 of
jixedbar.js and append this function to the very end of the file:
function doSomething() {
var screen=jQuery(this);
var screenWidth=screen.width();
var centerScreen=(screenWidth/2)*(1);
var marginLeft=centerScreen-($(obj).width()/2);$(obj).css({"margin-
left":marginLeft});
};
var resizeTimer = null;
$(window).bind('resize', function() {
if (resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(doSomething, 1);
});
all the best,
dan popp
PS: wonderful project you have here, great work! and thank you very
much!!