BVB Source Codes

Shandong kernel enterprise stand the source code Show dropdown.js Source code

Return Download Shandong kernel enterprise stand the source code: download dropdown.js Source code - Download Shandong kernel enterprise stand the source code Source code - Type:.js
  1. var cssdropdown={
  2. disappeardelay: 250,
  3. disablemenuclick: false,
  4. enableswipe: 1,
  5. enableiframeshim: 1,
  6. dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all, swipetimer: undefined, bottomclip:0,
  7.  
  8. getposOffset:function(what, offsettype){
  9. var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
  10. var parentEl=what.offsetParent;
  11. while (parentEl!=null){
  12. totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
  13. parentEl=parentEl.offsetParent;
  14. }
  15. return totaloffset;
  16. },
  17.  
  18. swipeeffect:function(){
  19. if (this.bottomclip<parseInt(this.dropmenuobj.offsetHeight)){
  20. this.bottomclip+=10+(this.bottomclip/10)
  21. this.dropmenuobj.style.clip="rect(0 auto "+this.bottomclip+"px 0)"
  22. }
  23. else
  24. return
  25. this.swipetimer=setTimeout("cssdropdown.swipeeffect()", 10)
  26. },
  27.  
  28. showhide:function(obj, e){
  29. if (this.ie || this.firefox)
  30. this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"
  31. if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover"){
  32. if (this.enableswipe==1){
  33. if (typeof this.swipetimer!="undefined")
  34. clearTimeout(this.swipetimer)
  35. obj.clip="rect(0 auto 0 0)"
  36. this.bottomclip=0
  37. this.swipeeffect()
  38. }
  39. obj.visibility="visible"
  40. }
  41. else if (e.type=="click")
  42. obj.visibility="hidden"
  43. },
  44.  
  45. iecompattest:function(){
  46. return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
  47. },
  48.  
  49. clearbrowseredge:function(obj, whichedge){
  50. var edgeoffset=0
  51. if (whichedge=="rightedge"){
  52. var windowedge=this.ie && !window.opera? this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
  53. this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
  54. if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  
  55. edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth
  56. }
  57. else{
  58. var topedge=this.ie && !window.opera? this.iecompattest().scrollTop : window.pageYOffset
  59. var windowedge=this.ie && !window.opera? this.iecompattest().scrollTop+this.iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
  60. this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
  61. if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){
  62. edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
  63. if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure)
  64. edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
  65. }
  66. }
  67. return edgeoffset
  68. },
  69.  
  70. dropit:function(obj, e, dropmenuID){
  71. if (this.dropmenuobj!=null)
  72.         this.dropmenuobj.style.visibility="hidden"
  73. this.clearhidemenu()
  74. if (this.ie||this.firefox){
  75. obj.onmouseout=function(){cssdropdown.delayhidemenu()}
  76. obj.onclick=function(){return !cssdropdown.disablemenuclick}
  77. this.dropmenuobj=document.getElementById(dropmenuID)
  78. if(!this.dropmenuobj) return;
  79. this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
  80. this.dropmenuobj.onmouseout=function(e){cssdropdown.dynamichide(e)}
  81. this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
  82. this.showhide(this.dropmenuobj.style, e)
  83. this.dropmenuobj.x=this.getposOffset(obj, "left")
  84. this.dropmenuobj.y=this.getposOffset(obj, "top")
  85. this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
  86. this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
  87. this.positionshim()
  88. }
  89. },
  90.  
  91. positionshim:function(){
  92. if (this.enableiframeshim && typeof this.shimobject!="undefined"){
  93. if (this.dropmenuobj.style.visibility=="visible"){
  94. this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"
  95. this.shimobject.style.height=this.dropmenuobj.offsetHeight+"px"
  96. this.shimobject.style.left=this.dropmenuobj.style.left
  97. this.shimobject.style.top=this.dropmenuobj.style.top
  98. }
  99. this.shimobject.style.display=(this.dropmenuobj.style.visibility=="visible")? "block" : "none"
  100. }
  101. },
  102.  
  103. hideshim:function(){
  104. if (this.enableiframeshim && typeof this.shimobject!="undefined")
  105. this.shimobject.style.display='none'
  106. },
  107.  
  108. contains_firefox:function(a, b) {
  109. while (b.parentNode)
  110. if ((b = b.parentNode) == a)
  111. return true;
  112. return false;
  113. },
  114.  
  115. dynamichide:function(e){
  116. var evtobj=window.event? window.event : e
  117. if (this.ie&&!this.dropmenuobj.contains(evtobj.toElement))
  118. this.delayhidemenu()
  119. else if (this.firefox&&e.currentTarget!= evtobj.relatedTarget&& !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))
  120. this.delayhidemenu()
  121. },
  122.  
  123. delayhidemenu:function(){
  124. this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'; cssdropdown.hideshim()",this.disappeardelay)
  125. },
  126.  
  127. clearhidemenu:function(){
  128. if (this.delayhide!="undefined")
  129. clearTimeout(this.delayhide)
  130. },
  131.  
  132. startchrome:function(){
  133. for (var ids=0; ids<arguments.length; ids++){
  134. var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
  135. for (var i=0; i<menuitems.length; i++){
  136. if (menuitems[i].getAttribute("rel")){
  137. var relvalue=menuitems[i].getAttribute("rel")
  138. menuitems[i].onmouseover=function(e){
  139. var event=typeof e!="undefined"? e : window.event
  140. cssdropdown.dropit(this,event,this.getAttribute("rel"))
  141. }
  142. }
  143. }
  144. }
  145. if (window.createPopup && !window.XmlHttpRequest){
  146. document.write('<IFRAME id="iframeshim"  src="" style="display: none; left: 0; top: 0; z-index: 90; position: absolute; filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)" frameBorder="0" scrolling="no"></IFRAME>')
  147. this.shimobject=document.getElementById("iframeshim")
  148. }
  149. }
  150.  
  151. }
downloaddropdown.js Source code - Download Shandong kernel enterprise stand the source code Source code
Related Source Codes/Software:
Dede V2.2 dance music program - This system is based on DEDE5.7 sp1 production dan... 2016-11-11
Search engine v1.0 eight grams of novels - This program consists of WEB side and collection p... 2016-11-11
A thief free Jacky novel CMS, support for multiple station collection, support pseudo original SEO - A thief free Jacky novel CMS, support for multiple... 2016-11-11
Kunlun lubricating oil companies stand the source code - Just testing, free, source code is very beautiful ... 2016-11-11
Imitation of Chinese stationmaster net source dreams to 5.7 sp1 source code - Exactly the same and the Director of China network... 2016-11-11
Newscoop CMS v4.0.4 multilingual version - Newscoop is a content management system is mainly ... 2016-11-11
Ku978 navigator free send you department (with acquisition module) - Is I purchase the commercial version of this progr... 2016-11-11
Think of concise message this v1.1 - Wisdom of concise message this V1.1 main functions... 2016-11-11
nvidia-docker - Build and run Docker containers leveraging NVIDIA ... 2017-04-08
quickstart - Angular 2 QuickStart - source from the documentati... 2017-04-08
jQuery-Autocomplete - Ajax Autocomplete for jQuery allows you to easily ... 2017-04-08
Android-Best-Practices - Android best practice examples 2017-04-08
Bootstrap-Admin-Template - Metis - Free Bootstrap Admin Dashboard Template ... 2017-04-08
CocoaSPDY - SPDY for iOS and OS X 2017-04-08
parse-dashboard - A dashboard for managing your Parse apps that aren... 2017-04-08
HoloEverywhere - NO LONGER MAINTAINED. DEVELOP FOR 4.X+ DUDE. 2017-04-08
side-comments - [UNMAINTAINED] An interface component to give your... 2017-04-08
SVG-Morpheus - JavaScript library enabling SVG icons to morph fro... 2017-04-08

 Back to top