Draggable problem in Chrome and Safari
I have a problem with Chrome and Safari... tried this in IE, FF and it works fine
but in Chrome and Safari, dragging the element causes it to highlight the contents, start dragging the top image inside of the element and when I release mouse click the element follows my mouse around until i click again
my code:
- <style type="text/css">
- #container {
- position: absolute;
- top: 0;
- left: 0;
- width: 600px;
- height: 800px;
- margin-left: -150px;
- }
- #item {
- position: absolute;
- width: 300px;
- height: 400px;
- }
- #item img {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- }
- </style>
- <script type="text/javascript">
- $(document).ready( function() {
- $('#item').draggable({
- cursor: 'more',
- containment: 'parent'
- });
- });
- </script>
- <div id="container">
- <div id="item">
- <img src="image1.jpg" />
- <img src="image2.jpg" />
- <img src="image3.jpg" />
- <img src="image4.jpg" />
- <img src="image5.jpg" />
- </div>
- </div>