I'm completely guessing but i think these lines might be the problem:

                        newTop= window.height - $(this).outerHeight();
                        newLeft= window.width - $(this).outerWidth();

maybe try:

                        newTop= $(window).height() - $
(this).outerHeight();
                        newLeft= $(window).width() - $(this).outerWidth
();

Good luck

pd

On Nov 12, 1:24 pm, CodingCyborg <[EMAIL PROTECTED]> wrote:
> I have a script to keep the draggable windows from leaving the main
> window they are in. When I comment out the code everything else works
> perfectly. But if I allow this code to be included, not everything
> loads, the windows won't move, but nothing shows up in error console.
>
>         jQuery(document).mousemove(function(){
>                 $('.draggableWindow').each(function(){
>                         if(parseInt($(this).css("top")) < 0){
>                         $(this).css("top", "0");
>                         }
>                         if(parseInt($(this).css("left")) < 0){
>                         $(this).css("left","0");
>                         }
>                         newTop= window.height - $(this).outerHeight();
>                         newLeft= window.width - $(this).outerWidth();
>                         if(parseInt($(this).css("top")) > newTop){
>                         $(this).css("top", newTop);
>                         }
>                         if(parseInt($(this).css("left")) > newLeft){
>                         $(this).css("left", newLeft);
>                         }
>                 }
>         });
>
> Not sure whats messing it up. I've tried changing a few parts of it to
> no prevail. Help is appreciated.
>
> -CodingCyborg

Reply via email to