Reputation: 13850
Why isn't jQueryUI draggable working in IE 8 for me? The strange thing is that resizable is working.
My Javascript code is following:
$(OBJ.cropProfileMiniatureRectangle)
.draggable({ containment: OBJ.cropProfileMiniatureContainer })
.resizable({
handles: 'se',
aspectRatio: true,
minWidth: 100,
maxWidth: 445,
minHeight: 100,
maxHeight: 445,
containment: OBJ.cropProfileMiniatureContainer
});
I have tried to change $(OBJ.cropProfileMiniatureRectangle).draggable()
only, but still the same problem applies. But when I visit their example, it is working. What have I done wrong?
Upvotes: 0
Views: 375
Reputation: 16446
As far as I know, you can't specify an object directly on the containment param. From the example page:
containment:
Constrains dragging to within the bounds of the specified element or region. Possible string values: 'parent', 'document', 'window', [x1, y1, x2, y2].
Edit: I've tested in the demo page with the console and I was able to use a selector there by running: $( "#draggable" ).draggable({containment:'#demo-frame'});
.
Can you post your HTML and CSS or a jsFiddle?
Upvotes: 1