But if I try to resize the element using JQuery UI resizable class then it disturb the "percentage" and put pixel over it.
Same thing occur with draggble and other which put final output in "pixel" format.
I would be better if you make all UI component as percentage format.
however I got the workaround to the problem,,
one can add these stop function like
$("#div_box_id_").resizable({
handles: "all",
stop: function (){
var w = ( 100 * parseFloat($(this).css("width"
var h = ( 100 * parseFloat($(this).css("
$(this).css("width" , w);
$(this).css("height" , h);
},
dragHandle: true
});
$("#div_box_id_" + self.div_box_number).
opacity: 0.70,
stop: function (){
var l = ( 100 * parseFloat($(this).css("left")
var t = ( 100 * parseFloat($(this).css("top")) / parseFloat($(this).parent().
$(this).css("left" , l);
$(this).css("top" , t);
}
});
No comments:
Post a Comment