I am working on code where I want to zoom my div-slides , I am able to do
this because i am using "percentage" in width , height , font etc style
attributes.
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")) /
parseFloat($(this).parent().css("width")) )+ "%" ;
 var h = ( 100 * parseFloat($(this).css("height")) /
parseFloat($(this).parent().css("height")) )+ "%" ;
 $(this).css("width" , w);
 $(this).css("height" , h);
 },
 dragHandle: true
});

$("#div_box_id_" + self.div_box_number).draggable({
 opacity: 0.70,
 stop: function (){
 var l = ( 100 * parseFloat($(this).css("left")) /
parseFloat($(this).parent().css("width")) )+ "%" ;
 var t = ( 100 * parseFloat($(this).css("top")) /
parseFloat($(this).parent().css("height")) )+ "%" ;
 $(this).css("left" , l);
 $(this).css("top" , t);
 }
});


Any suggestions ??
-- 
┌───[ Narendra Sisodiya ]──────────────┐
│     http://narendra.techfandu.orghttp://www.lug-iitd.org
└────────────[ +91-93790-75930 ]──────┘

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to