Skip to main content

Search and Top Navigation

#7727 closed bug (notabug)

Opened September 19, 2011 08:57AM UTC

Closed September 19, 2011 08:59PM UTC

Selectors' orders for jQuery UI button

Reported by: Rashidi Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.button Version: 1.8.6
Keywords: Cc:
Blocked by: Blocking:
Description

Hello.

The following code failed to transform the link to a button.

<html>
<head>
        <link rel="stylesheet" type="text/css" media="screen" href="css/v/jqui/publisher-default.css" />
        <script type="text/javascript" src="js/v/jquery.js"></script>
        <script type="text/javascript" src="js/v/jquery-ui.js"></script>
        <script type="text/javascript">
        $(function() {
                $( "button, input:button, input:submit, a.button" ).button();
        });
        </script>
</head>
<body>
        <a href="#" class="button" id="i-am-a-link">Link</a>
        <br/>
        <button>foo</button>
</body>
</html>

However when I moved the selector button from being the first in the list. The script works.

<html>
<head>
        <link rel="stylesheet" type="text/css" media="screen" href="css/v/jqui/publisher-default.css" />
        <script type="text/javascript" src="js/v/jquery.js"></script>
        <script type="text/javascript" src="js/v/jquery-ui.js"></script>
        <script type="text/javascript">
        $(function() {
                $( "input:button, input:submit, button, a.button" ).button();
        });
        </script>
</head>
<body>
        <a href="#" class="button" id="i-am-a-link">Link</a>
        <br/>
        <button>foo</button>
</body>
</html>
Attachments (0)
Change History (2)

Changed September 19, 2011 09:02AM UTC by Rashidi comment:1

Additional information. The bug occurs with Opera browser.

Changed September 19, 2011 08:59PM UTC by scottgonzalez comment:2

resolution: → invalid
status: newclosed

This is a jQuery bug, not a jQuery UI bug. See #7094 and http://bugs.jquery.com/ticket/8468.