Well, it turns out I just wasn't paying attention when I ended the .each function and only had a } when I needed a }); That fixed it all up and it's running fine now :)
On Nov 12, 3:55 pm, CodingCyborg <[EMAIL PROTECTED]> wrote: > Thank you for your response. Unfortunately that didn't solve the > problem, nor did it bring any errors to error console. I believe both > ways of doing that are valid, unless there is something in the code > stopping it from getting there, in which case they might not work. > Would it be possible that other code in the script is making this not > work? Or is it most likely this script being screwy? > > On Nov 11, 11:41 pm, pd <[EMAIL PROTECTED]> wrote: > > > 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