Side navigation
#8103 closed bug (invalid)
Opened January 31, 2011 07:10PM UTC
Closed February 15, 2011 07:53AM UTC
Last modified March 13, 2012 07:34PM UTC
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
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 );
Attachments (0)
Change History (3)
Changed January 31, 2011 07:42PM UTC by comment:1
component: | unfiled → manipulation |
---|---|
owner: | → hchwu2007 |
priority: | undecided → low |
status: | new → pending |
Changed January 31, 2011 09:24PM UTC by comment:2
description: | 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 ); → 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 ); \ }}} |
---|
Changed February 15, 2011 07:53AM UTC by comment:3
resolution: | → invalid |
---|---|
status: | pending → closed |
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!
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.