[jQuery] Modal Window Background Fade/Disable
Hi I have this Java sciprt code and jquery and this is a sliding
window hide/open.
The html is not in a seperate page its in the same page as the
background of the page is.
I would like to make the background fade or disable untill we close
this window.........
I dont' think I can call it modal window if I am not wrong
very similar to this page
http://www.webresourcesdepot.com/wp-content/uploads/file/jquery-sliding-menu/
<script type="text/javascript">
$(document).ready(function() {
$(".topMenuAction").click(function() {
if ($("#openCloseIdentifier").is(":hidden")) {
$("#slider").animate({
marginTop: "-534px"
}, 500);
$("#topMenuImage").html('<img
src="customercare_btn.gif" alt="open" />');
$("#openCloseIdentifier").show();
} else {
$("#slider").animate({
marginTop: "0px"
}, 500);
$("#topMenuImage").html('<img
src="customer_care_bgtrans.gif" alt="close" />');
$("#openCloseIdentifier").hide();
}
});
});
</script>
this is the Jquery in a file its ver long
(function(){var _jQuery=window.jQuery,_$=window.$;var
jQuery=window.jQuery=window.$=function(selector,context){return new
jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]
*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*
$/,undefined;jQuery.fn=jQuery.prototype={init:function
(selector,context){selector=selector||document;if(selector.nodeType)
{this[0]=selector;this.length=1;return this;}if(typeof
selector=="string"){var match=quickExpr.exec(selector);if(match&&(match
[1]||!context)){if(match[1])selector=jQuery.clean([match
[1]],context);else{var elem=document.getElementById(match[3]);if(elem)
{if(elem.id!=match[3])return jQuery().find(selector);return jQuery
(elem);}selector=[];}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction
(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"]
(selector);return this.setArray(jQuery.makeArray
(selector));},jquery:"1.2.6",size:function(){return
this.length;},length:0,get:function(num){return num==undefined?
jQuery.makeArray(this):this[num];},pushStack:function(elems){var
ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function
(elems){this.length=0;Array.prototype.push.apply(this,elems);return
this;},each:function(callback,args){return jQuery.each
(this,callback,args);},index:function(elem){var ret=-1;return
jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function
(name,value,type){var options=name;if(name.constructor==String)if
(value===undefined)return this[0]&&jQuery[type||"attr"](this
[0],name);else{options={};options[name]=value;}return this.each
(function(i){for(name in options)jQuery.attr(type?
this.style:this,name,jQuery.prop(this,options
[name],type,i,name));});},css:function(key,value){if((key=='width'||
key=='height')&&parseFloat(value)<0)value=undefined;return this.attr
(key,value,"curCSS");},text:function(text){if(typeof text!
="object"&&text!=null)return this.empty().append((this[0]&&this
[0].ownerDocument||document).createTextNode(text));var
ret="";jQuery.each(text||this,function(){jQuery.each
(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?
this.nodeValue:jQuery.fn.text([this]);});});return
ret;},wrapAll:function(html){if(this[0])jQuery(html,this
[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var
elem=this;while(elem.firstChild)elem=elem.firstChild;return
elem;}).append(this);return this;},wrapInner:function(html){return
this.each(function(){jQuery(this).contents().wrapAll
(html);});},wrap:function(html){return this.each(function(){jQuery
(this).wrapAll(html);});},append:function(){return this.domManip
(arguments,true,false,function(elem){if(this.nodeType==1)
this.appendChild(elem);});},prepend:function(){return this.domManip
(arguments,true,true,function(elem){if(this.nodeType==1)
this.insertBefore(elem,this.firstChild);});},before:function(){return
this.domManip(arguments,false,false,function(elem)
{this.parentNode.insertBefore(elem,this);});},after:function(){return
this.domManip(arguments,false,true,function(elem)
{this.parentNode.insertBefore(elem,this.nextSibling);});},end:function
(){return this.prevObject||jQuery([]);},find:function(selector){var
elems=jQuery.map(this,function(elem){return jQuery.find
(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||
selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function
(events){var ret=this.map(function(){if(jQuery.browser.msie&&!
jQuery.isXMLDoc(this)){var clone=this.cloneNode
(true),container=document.createElement("div");container.appendChild
(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find("*").andSelf().each
(function(){if(this[expando]!=undefined)this[expando]=null;});if
(events===true)this.find("*").andSelf().each(function(i){if
(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var
type in events)for(var handler in events[type])jQuery.event.add(clone
[i],type,events[type][handler],events[type][handler].data);});return
ret;},filter:function(selector){return this.pushStack(jQuery.isFunction
(selector)&&jQuery.grep(this,function(elem,i){return selector.call
(elem,i);})||jQuery.multiFilter(selector,this));},not:function
(selector){if(selector.constructor==String)if(isSimple.test(selector))
return this.pushStack(jQuery.multiFilter(selector,this,true));else
selector=jQuery.multiFilter(selector,this);var
isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!
selector.nodeType;return this.filter(function(){return isArrayLike?
jQuery.inArray(this,selector)<0:this!=selector;});},add:function
(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get
(),typeof selector=='string'?jQuery(selector):jQuery.makeArray
(selector))));},is:function(selector){return!!
selector&&jQuery.multiFilter
(selector,this).length>0;},hasClass:function(selector){return this.is
("."+selector);},val:function(value){if(value==undefined){if
(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var
index=elem.selectedIndex,values=
[],options=elem.options,one=elem.type=="select-one";if(index<0)return
null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++)
{var option=options[i];if(option.selected){value=jQuery.browser.msie&&!
option.attributes.value.specified?option.text:option.value;if(one)
return value;values.push(value);}}return values;}else
return(this[0].value||"").replace(/\r/g,"");}return undefined;}if
(value.constructor==Number)value+='';return this.each(function(){if
(this.nodeType!=1)return;if(value.constructor==Array&&/radio|
checkbox/.test(this.type))this.checked=(jQuery.inArray
(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if
(jQuery.nodeName(this,"select")){var values=jQuery.makeArray
(value);jQuery("option",this).each(function(){this.selected=
(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)