Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#8103 closed bug (invalid)

compatibility issues with IE7 and 6

Reported by: hchwu2007 Owned by: hchwu2007
Priority: low Milestone: 1.next
Component: manipulation Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by jitter)

This plugin is good in IE8 and Chrome. But in IE7 display invalid and have no effect. In theory, jQuery is compatible with all browser. So I do not know where it went wrong.

Hope to acquire your help, thank you.

(function( $ ){

$.fn.testIEDialog = function(options) {
	this.click(function(){alert('Test Dialog');return false;});
	
}


function getUrl(url){
	var urlTab = url.split(";");
	var html = '';
	var current = ' class="current"';
	$.each(urlTab, function(index){
		urlTab[index] = urlTab[index].split("|");
		
		if(index == 0){
			html += '<li' + current + '><a href="' + urlTab[index][0] + '">' + urlTab[index][1] + '</a></li>\n';
		} else {
			html += '<li><a href="' + urlTab[index][0] + '">' + urlTab[index][1] + '</a></li>\n';
		}
		
	});
	return html;
}


function getDialogSize(){
	var dialogWidth = $("#meSideDialog .dialogAjax").width();
	var dialogHeight = $("#meSideDialog .dialogAjax").height();
	$("#meSideDialog .dialogMark").css({"width" : dialogWidth , "height" : dialogHeight});
}

function addKey(div){
	div.attr('meSideDialog','open');
}

function removeKey(div){
	$("*[meSideDialog='open']").removeAttr('meSideDialog');	
	$("#meSideDialog").remove();
}
function getThisOpen(div){
	return div.attr('meSideDialog');
}


$.fn.meSideDialog = function(options) {
	
	
	var set = {
			'getUrl'			:	"#|Please try to refresh",
			'setAppend'			:	"body",
			'marginTop'			:	15,
			'marginLeft'		:	-10,
			'arrowLeft'			:	5,
			'cursorClose'		:	false
    };
	
	
	if(options){ 
		$.extend(set,options);
	}
	
	
	var _this = this;
	
	
	_this.click(function(){

		if( getThisOpen(_this) == 'open' ){
			
			removeKey(_this);
			
		} else {
		
			removeKey(_this);					
			var urlTab = getUrl(set.getUrl);	
			
			html = '';
			html += '<div id="meSideDialog" class="dialogBox"><div class="dialogAjax"><div class="arrow"></div>';
			html += '<div class="logTit"><ul>' + urlTab + '</ul><div class="close"></div><div class="clear"></div></div>';
			html += '<div class="dialogWrap"><div class="loading"></div></div></div><div class="dialogMark"></div></div>';
			
			$(set.setAppend).append(html);		
			getDialogSize();					
			
			
			$("#meSideDialog").css({'margin-top': set.marginTop + 'px','margin-left': set.marginLeft + 'px'});
			$("#meSideDialog .dialogAjax .arrow").css({'margin-left': set.arrowLeft + 'px'});
			
			addKey(_this);						
			
			
			var openAjax = $("#meSideDialog .dialogAjax .logTit ul li.current a").attr('href');
			$("#meSideDialog .dialogAjax .dialogWrap").load(
				openAjax,						
				{},								
				function(){
					getDialogSize();			
				}
			);
			
			
			$("#meSideDialog .dialogAjax .logTit .close").click(function(){
				removeKey(_this);				
				return false;
			});
			
			
			$("#meSideDialog .dialogAjax .logTit ul li a").click(function(){
				var nav = $(this);
				var navHref = nav.attr('href');														
				$("#meSideDialog .dialogAjax .logTit ul li").removeClass('current');				
				nav.parent().addClass('current');													
				$("#meSideDialog .dialogAjax .dialogWrap").html('<div class="loading"></div>');		
				getDialogSize();																	
				$("#meSideDialog .dialogAjax .dialogWrap").load(
					navHref,
					{},
					function(){
						getDialogSize();
					}
				);
				return false;
			});
		}
		
		return false;
		
	});
	
}

})( jQuery );

Change History (3)

comment:1 Changed 12 years ago by Rick Waldron

Component: unfiledmanipulation
Owner: set to hchwu2007
Priority: undecidedlow
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, test against the jQuery 0 GIT version to ensure the issue still exists.

comment:2 Changed 12 years ago by jitter

Description: modified (diff)

comment:3 Changed 12 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.