Hi,
I am having a trouble finding the updated div offset for IE 6 after a
portlet is moved to a new location.
The following is the source code. offsetHeight returns the updated
offset top position for firefox 3 but, for IE6, none of
these:offsetTop, offsetHeight, clientTop returns the updated offset
for the portlet div. I am using the latest jquery.(http://jqueryui.com/
latest/jquery-1.3.2.js) Thanks in advance.
Jason
<script type="text/javascript">
function $GetUpdWdtLoc() {
var updWdt = [];
var items = $('.portlet').get();
for (var i = 0; i < items.length; i++) {
if ($.browser.msie === true) {
updWdt.push(new widget(items[i]['id'],
items[i]['clientLeft'],
items[i]['offsetHeight'], 0, 0));
} else {
updWdt.push(new widget(items[i]['id'],
items[i]['offsetLeft'],
items[i]['offsetTop'], 0, 0));
}
}
}
$(function() {
$(".portlet").addClass("ui-widget ui-widget-content
ui-helper-
clearfix ui-corner-all")
.find(".portlet-header")
.addClass("ui-widget-header ui-corner-all")
.prepend('<span class="ui-icon
ui-icon-plusthick"></span>')
.end()
.find(".portlet-content");
$(".portlet-header .ui-icon").click(function() {
$(this).toggleClass("ui-icon-minusthick");
$(this).parents(".portlet:first").find(".portlet-content").toggle
();
});
// Making it sortable
$('.column').sortable({
opacity: 0.2,
connectWith: '.column',
update: function(e, ui) {
$GetUpdWdtLoc();
}
});
});
</script>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---