IE7 container madness on jQuery UI button click
Clicking jQuery UI buttons on a page using IE7 makes the container jump.
Under the 'Order the #product name#' slideDown on the left, clicking the Quantity Required buttons makes the container move up a few pixels. I can live with this but would like to know why it's happening.
The main problem is on the right han开发者_JAVA技巧d side. Clicking the buttons there takes the page across to the left, exposing the next floated div.
Why is it doing this and how can I stop it?!
You can see the page at http://www.thewebdes.co.uk/dev/cw/index.php.
-- edit --
Here's what I see when I click on each of the jQuery UI buttons in turn: http://www.thewebdes.co.uk/dev/cw/cw-ss.gif
Also, clicking straight onto the largest quantity takes the container across all the way as it did on the previous screenshot. Clicking back to a smaller quantity doesn't bring it back, if that gives any clues: http://www.thewebdes.co.uk/dev/cw/cw-ss2.gif
With the help of Val (see question comments), I've got this sorted:
The JS I'm using is:
$('.ui-button').click(function(){
$('#' + $(this).attr('for')).attr('checked','checked');
return false;
});
On each ui-button
click, return false
disables the IE7 jumping. However, it also removes the ui-button
s ability to check the appropriate radio button. The radio buttons (naturally) have an id of what the label is for
so I get this with '#' + $(this).attr('for')
to build the id I need for that radio button.
if somebody still has the problem, following css formating worked for me:
* + html .ui-helper-hidden-accessible {
position: fixed; /* Fix the jumpy behavior in IE 7*/
}
精彩评论