1) Drop-in content box v2.0
2) http://www.dynamicdrive.com/dynamici.../dropinbox.htm
3) Currently this script handles position of the drop in boxes by coordinates in relation to the browser window, (1,1) for top left corner of BROWSER WINDOW and (-1,-1) for lower right. In any case, I am needing to drop in 3 content windows but I need to have the script handle positioning based on the parent div of the (content div) not by browser width/height.
I am not a script programmer but have a basic working knowledge enough to implement them or in some case reverse engineer it to adjust what i need but this is beyond me. The script controlling the positioning is located in the "dropincontentbox.js" file and appears to be this section here:
what can be added to this code so that a "class" can be assigned in the content div that will tell it to handle positioning basedo n the containing parent divCode:dropincontentbox.prototype={ show:function(pos){ var $=jQuery, $contentbox=this.$contentbox.css({display:'block'}), s=this.s if (typeof pos=="undefined") var pos=s.pos var winmeasure={w:$(window).width(), h:$(window).height(), left:$(document).scrollLeft(), top:$(document).scrollTop()} //get various window measurements var boxmeasure={w:$contentbox.outerWidth(), h:$contentbox.outerHeight()} var finalpos=[] $.each(pos, function(i, val){ if (val<0){ //if position value is negative, it means box should be offset from right edge of window finalpos[i]=(i==0)? winmeasure.left+winmeasure.w-boxmeasure.w+val : winmeasure.top+winmeasure.h-boxmeasure.h+val } else if (val=="center"){ finalpos[i]=(i==0)? winmeasure.left+winmeasure.w/2-boxmeasure.w/2 : winmeasure.top+winmeasure.h/2-boxmeasure.h/2 } }) $contentbox.css({left:finalpos[0], top:winmeasure.top-boxmeasure.h-10, visibility:'visible'}).animate({top:finalpos[1]}, s.fxduration, s.fx) },
instead of the browser dimensions?
Thanks for any help!



Reply With Quote

Bookmarks