2011/11/3 Rohit Mehta <[email protected]>:
> Thanks poetro..i knw the css part of it. The toggle function is clear to me
> now.. I was confused with speed parameter in it and so mycode was not
> working..
>
> How to create the drag and drop and expanding boxes when clicked
> ?

If you still want to use jQuery for this, the jQuery UI package has
Draggable and Droppable plugins for that. You should check out the
examples
Draggable: http://jqueryui.com/demos/draggable/
Droppable: http://jqueryui.com/demos/droppable/

For the expanding box maybe just animate the width and height of the
box on click?

CSS:
.box {
    width: 100px;
    height: 100px;
    margin: -50px;
    top: 50%;
    left: 50%;
    background: red;
    position: absolute;
}

JS:
$('.box').click(function () {
    $(this).animate({
        width: '+=100',
        height: '+=100',
        margin: '-=50px'
    })
});

Demo: http://jsfiddle.net/Poetro/Q98Ax/

-- 
Poetro

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to