mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-12-07 06:14:24 +00:00
0c860b0d92
jQuery positional selectors () have been deprecated in [jQuery 3.4.0](https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/) and they'll be removed in jQuery 4.0.0. This PR removes their usage. Most of the changes were possible without changing public API. However, dropping `:even` usage required a change to the [`header` option](https://api.jqueryui.com/accordion/#option-header) of the accordion widget. I made it an optional function; this will need to be documented. The polyfill for `.even()` & `.odd()` is added for jQuery <3.5.0. There was no usage of the :odd selector in the code but the `.odd()` method is also polyfilled for completeness. Closes gh-1904
46 lines
1.3 KiB
HTML
46 lines
1.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Compound Visual Test: Draggable and Resizable block element</title>
|
|
<link rel="stylesheet" href="../visual.css">
|
|
<link rel="stylesheet" href="../../../themes/base/all.css">
|
|
<style>
|
|
.draggable {
|
|
margin: 0.5em;
|
|
padding: 0.5em;
|
|
}
|
|
.absolute {
|
|
color: red;
|
|
position: absolute !important;
|
|
}
|
|
</style>
|
|
<script src="../../../external/requirejs/require.js"></script>
|
|
<script src="../../../demos/bootstrap.js" data-modules="draggable resizable"
|
|
data-composite="true">
|
|
$( ".draggable" )
|
|
.addClass( "ui-widget ui-widget-header ui-corner-all" )
|
|
.draggable({
|
|
revert: "invalid"
|
|
})
|
|
.resizable({
|
|
minHeight: 13,
|
|
handles: "s"
|
|
});
|
|
$( ".draggable" ).last().addClass( "absolute" );
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<p>WHAT: Three draggable and resizable elements, with only a bottom handle. Last one (red color) is absolutely positioned.</p>
|
|
<p>EXPECTED: Each element can be dragged and resized. The first two stay with their relative positioning (induced by draggable). The last one can be resized despite the absolute positioning.</p>
|
|
|
|
<div id="first">
|
|
<div class="draggable">Draggable 1-1</div>
|
|
<div class="draggable">Draggable 1-2</div>
|
|
<div class="draggable">Draggable 1-3</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|