Hello again,

Thanx for you kind answeres, ive tried to figure out how to get
the new position, but i simply do not know how to get the value.

This is what ive tried:
var POS_COOKIE = getElementById('divname')
$.cookie('position', 'POS_COOKIE');

And ive probably misunderstood how it works to...

Sorry for not understanding, im not used to programing. Im more of a
designer.

On 2/20/07, Jake McGraw <[EMAIL PROTECTED]> wrote:

Mikael:

I think you would want to write to the cookie when you stop dragging the
container and actually have an updated position. Interface 'Resizables' has
you covered, bind the cookie write function to onDragStop (
http://interface.eyecon.ro/docs/resizable):

$('#window').Resizable(
            {
                minWidth: 400,
                minHeight: 10,
                maxWidth: 700,
                maxHeight: 445,
                dragHandle: '#windowTop',
                onDragStop: function () {/* Write position to cookie here.
*/},
                handlers: {
                    se: '#windowResize'
                },
                onResize : function(size, position) {
                    $('#windowBottom, #windowBottomContent').css('height',
size.height-33 + 'px');
                    var windowContentEl = $('#windowContent').css('width',
size.width - 25 + 'px');
                    if (!document.getElementById('window').isMinimized) {
                        windowContentEl.css('height', size.height - 48 +
'px');
                    }
                }
            }
        );


On 2/20/07, Mikael Noone < [EMAIL PROTECTED]> wrote:
> That is exacly what i cant figure out, where to use it and how.
> I want to save the new position that are set on css when i drag the
window.
> And i dont know if it should be in the window plugin script or the
interface
> script..
>
>
> On 2/20/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> > Mikael Noone schrieb:
> > > Hi there Klaus,
> > >
> > > Thanx for your answer, ive tried all day to get this to work, but im
> > > doing something wrong.
> > > This is the code im trying to get the cookies to work with, please
see
> > > if you could help me out.
> > > Maybe it will help others out to, since it seems to be hard to
figure
> out.
> > > Or im having my thumb up my a** ;)
> > >
> > > $(document).ready(
> > >     function()
> > >
> > >     {
> > >         $('#windowOpen').bind(
> > >             'click',
> > >             function() {
> > >                 if($('#window').css('display') == 'none') {
> > >                     $(this).TransferTo(
> > >                         {
> > >                             to:'window',
> > >                             className:'transferer2',
> > >                             duration: 400,
> > >                             complete: function()
> > >                             {
> > >                                 $('#window').show();
> > >                             }
> > >                         }
> > >                     );
> > >                 }
> > >                 this.blur();
> > >                 return false;
> > >             }
> > >         );
> > >         $('#windowClose').bind(
> > >             'click',
> > >             function()
> > >             {
> > >                 $('#window').TransferTo(
> > >                     {
> > >                         to:'windowOpen',
> > >                         className:'transferer2',
> > >                         duration: 400
> > >                     }
> > >                 ).hide();
> > >             }
> > >         );
> > >         $('#windowMin').bind(
> > >             'click',
> > >             function()
> > >             {
> > >
> $('#windowContent').BlindToggleVertically(300);
> > >                 $('#windowBottom,
> > > #windowBottomContent').animate({height: 10}, 300);
> > >
> $('#window').animate({height:40},300).get(0).isMinimized
> > > = true;
> > >                 $(this).hide();
> > >                 $('#windowResize').hide();
> > >                 $('#windowMax').show();
> > >             }
> > >         );
> > >         $('#windowMax').bind(
> > >             'click',
> > >             function()
> > >             {
> > >                 var windowSize =
> > > $.iUtil.getSize(document.getElementById('windowContent'));
> > >                 $('#windowContent').SlideToggleUp(300);
> > >                 $('#windowBottom,
> > > #windowBottomContent').animate({height: windowSize.hb +
> 13}, 300);
> > >                 $('#window').animate({height: windowSize.hb+43},
> > > 300).get(0).isMinimized = false;
> > >                 $(this).hide();
> > >                 $('#windowMin, #windowResize').show();
> > >             }
> > >         );
> > >         $('#window').Resizable(
> > >             {
> > >                 minWidth: 400,
> > >                 minHeight: 10,
> > >                 maxWidth: 700,
> > >                 maxHeight: 445,
> > >                 dragHandle: '#windowTop',
> > >                 handlers: {
> > >                     se: '#windowResize'
> > >                 },
> > >                 onResize : function(size, position) {
> > >                     $('#windowBottom,
> > > #windowBottomContent').css('height', size.height-33 +
> 'px');
> > >                     var windowContentEl =
> > > $('#windowContent').css('width', size.width - 25 +
> 'px');
> > >                     if
> (!document.getElementById('window').isMinimized) {
> > >                         windowContentEl.css ('height', size.height -
48
> +
> > > 'px');
> > >                     }
> > >                 }
> > >             }
> > >         );
> > >     }
> > > );
> > >
> > > Thanx alot. / Nisse.
> >
> >
> > I can't see where you use the cookie plugin...?
> >
> >
> > -- Klaus
> >
> > _______________________________________________
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to