Ticket #4780: accordion_a_zoom_1.html

File accordion_a_zoom_1.html, 1.5 KB (added by rdworth, 11 years ago)
Line 
1<!DOCTYPE html>
2<html>
3<head>
4<meta charset="utf-8" />
5<style type="text/css">
6div { clear: left; }
7</style>
8<script src="http://jquery-ui.googlecode.com/svn/trunk/jquery-1.3.2.js"></script>
9<script src="http://jquery-ui.googlecode.com/svn/trunk/ui/ui.core.js"></script>
10<script src="http://jquery-ui.googlecode.com/svn/trunk/ui/ui.accordion.js"></script>
11<script>
12$(function() {
13        $('#click').click(function() {
14                $('#accordion').accordion().find('h3').text('Accordion');
15                $('#accordion a:has(img):last').css('zoom', '');
16        });
17});
18</script>
19</head>
20<body>
21<button id="click">Click to make accordion</button>
22<div id="accordion">
23        <h3>Not Accordion</h3>
24        <div>
25                <div>
26                        <a href="http://jqueryui.com/">
27                                <img style="float:left;" src="http://jqueryui.com/images/home-nav-widgets.gif">
28                        </a>
29                        This text should be wrapping around the image to the left, with no whitespace above it. If it isn't in IE, it's because of the following code in ui.accordion.js:
30<code><pre>// IE7-/Win - Extra vertical space in lists fixed
31if ($.browser.msie) {
32        this.element.find('a').css('zoom', '1');
33}
34</pre></code>
35                </div>
36                <hr>
37                <div>
38                        <a href="http://jqueryui.com/">
39                                <img style="float:left;" src="http://jqueryui.com/images/home-nav-widgets.gif">
40                        </a>
41                        This text should has been made to wrap around the image to the left, with no whitespace above it, by resetting the zoom css on the A element that wraps the img.
42<code><pre>$('#accordion a:has(img):last').css('zoom', '');
43</pre></code>
44                </div>
45        </div>
46</div>
47</body>
48</html>