document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. // طريقة تثبيت أداة معينة فى مدونات بلوجر
  2. // مدونة أبو إياد www.abu-iyad.com
  3. //<![CDATA[
  4. bs_makeSticky("الرقم التعريفى للأداة"); // enter your widget ID here
  5. function bs_makeSticky(elem) {
  6.     var bs_sticky = document.getElementById(elem);
  7.     var scrollee = document.createElement("div");
  8.     bs_sticky.parentNode.insertBefore(scrollee, bs_sticky);
  9.     var width = bs_sticky.offsetWidth;
  10.     var iniClass = bs_sticky.className + \' bs_sticky\';
  11.     window.addEventListener(\'scroll\', bs_sticking, false);
  12.     function bs_sticking() {
  13.         var rect = scrollee.getBoundingClientRect();
  14.         if (rect.top < 0) {
  15.             bs_sticky.className = iniClass + \' bs_sticking\';
  16.             bs_sticky.style.width = width + "px";
  17.         } else {
  18.             bs_sticky.className = iniClass;
  19.         }
  20.     }
  21. }
  22. //]]>
  23. </script>
  24.  
  25. <style>
  26. .bs_sticking {background:#f2f2f2 !important; position:fixed !important; top:0; z-index:9999; box-shadow:0px 10px 4px -5px rgba(0,0,0,0.3); margin-top: 0; position:relative\\9 !important;}
  27. </style>
');