0

Hai,

Currently I'm writing code in ASP.NET using VB language. In my page, In left panel I have set of contents and in right there is a Calendar(Refer attachment CalendarView).
I am using jquery (draggable pluggin)Drag Over and Drag Out methods to drag and drop the contents into a particular day(from left panel to right, refer attachment Draggable). My problem is when I drag the content, the content image does not not move with mouse pointer though I have set the CursorAt to position the pointer with the image, its not working fine, hence drag over and drag out methods are not triggered porperly, What should I do to make them (both pointer and content) move together.

I'm quite newbie in .NET. So any help would be very appreciated. Thanks a lot

Best regards,
Keerti

Attachments CalendarView.png 51.36 KB Draggable.png 191.11 KB
2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by keertg
0

Sorry i am new here.
The code i have:

// To set cursor position
 $(objDrag).draggable
                 (
                    zIndex: 1000,
                        cursor: 'default',
                        cursorAt: { right: 70 },
}

//Drag over
HEDLayoutDragOver: function (currentCellObject) {
            var RSDateBoxTD = $(".rsDateWrap", currentCellMonthObject);
            var DateBoxTD = $("div:first-child", RSDateBoxTD);
            var LastWrapTD = $(".rsLastWrap", currentCellMonthObject);

            previousCellTopClass = DateBoxTD.attr("class");
            RSDateBoxTD.removeClass("rsDateWrap").addClass("HighlightDroppedDayTop");
            DateBoxTD.removeClass("rsDateBox").addClass("HighlightDroppedDayTopCell");
            LastWrapTD.removeClass("rsLastWrap").addClass("HighlightDroppedDayCell");
        }
    },

//Drag Out
 HEDLayoutDragOut: function (currentCellObject) {
 $(".HighlightDroppedDayTop", currentCellObject).removeClass("HighlightDroppedDayTop").addClass("rsDateWrap");
            $(".HighlightDroppedDayCell", currentCellObject).removeClass("HighlightDroppedDayCell").addClass("rsLastWrap");
            $(".HighlightDroppedDayTopCell", currentCellObject).removeClass("HighlightDroppedDayTopCell").addClass(previousCellTopClass);
            $(".rsWrap.rsDateWrap.rsLastWrap", currentCellObject).css({ "cursor": "default" });
        }
    },

Edited by __avd: Added [code] tags.

0

please dont use word urgent. no one will help you.
http://jqueryui.com/demos/draggable/#sortable

or show me your code.
anyways you got a classy design :-)

Sorry i am new here.
The code i have:

// To set cursor position
$(objDrag).draggable
(
zIndex: 1000,
cursor: 'default',
cursorAt: { right: 70 },
}

//Drag over
HEDLayoutDragOver: function (currentCellObject) {
var RSDateBoxTD = $(".rsDateWrap", currentCellMonthObject);
var DateBoxTD = $("div:first-child", RSDateBoxTD);
var LastWrapTD = $(".rsLastWrap", currentCellMonthObject);

previousCellTopClass = DateBoxTD.attr("class");
RSDateBoxTD.removeClass("rsDateWrap").addClass("HighlightDroppedDayTop");
DateBoxTD.removeClass("rsDateBox").addClass("HighlightDroppedDayTopCell");
LastWrapTD.removeClass("rsLastWrap").addClass("HighlightDroppedDayCell");
}
},

//Drag Out
HEDLayoutDragOut: function (currentCellObject) {
$(".HighlightDroppedDayTop", currentCellObject).removeClass("HighlightDroppedDayTop").addClass("rsDateWrap");
$(".HighlightDroppedDayCell", currentCellObject).removeClass("HighlightDroppedDayCell").addClass("rsLastWrap");
$(".HighlightDroppedDayTopCell", currentCellObject).removeClass("HighlightDroppedDayTopCell").addClass(previousCellTopClass);
$(".rsWrap.rsDateWrap.rsLastWrap", currentCellObject).css({ "cursor": "default" });
}
},

Edited by __avd: Added [code] tags.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.