diff --git a/guiders-1.2.0.css b/guiders-1.2.0.css index b948089..ec39a28 100755 --- a/guiders-1.2.0.css +++ b/guiders-1.2.0.css @@ -130,3 +130,8 @@ background-position: 0px -84px; left: -42px; } + +.guider_highlight { + position: relative; + z-index: 101; +} \ No newline at end of file diff --git a/guiders-1.2.0.js b/guiders-1.2.0.js index f6d1edb..ccb19d7 100644 --- a/guiders-1.2.0.js +++ b/guiders-1.2.0.js @@ -60,7 +60,6 @@ var guiders = (function($) { guiders._guiders = {}; guiders._lastCreatedGuiderID = null; guiders._nextButtonTitle = "Next"; - guiders._zIndexForHighlight = 101; guiders._addButtons = function(myGuider) { // Add buttons @@ -190,11 +189,11 @@ var guiders = (function($) { }; guiders._highlightElement = function(selector) { - $(selector).css({'z-index': guiders._zIndexForHighlight}); + $(selector).addClass('guider_highlight'); }; guiders._dehighlightElement = function(selector) { - $(selector).css({'z-index': 1}); + $(selector).removeClass('guider_highlight'); }; guiders._hideOverlay = function() { @@ -345,6 +344,10 @@ var guiders = (function($) { guiders.hideAll = function(omitHidingOverlay) { $(".guider").fadeOut("fast"); + var currentGuider = guiders._guiders[guiders._currentGuiderID]; + if (currentGuider.highlight) { + guiders._dehighlightElement(currentGuider.highlight); + } if (typeof omitHidingOverlay !== "undefined" && omitHidingOverlay === true) { // do nothing for now } else {