Tuesday, May 13, 2014

  •    FLOATING DIV in scroll following
  • 1. Place on <HEAD>

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
        <script language="javascript">

                $(document).ready(function(){

             //on window scroll fire it will call a function.

                    $(window).scroll(function () {

             //after window scroll fire it will add define pixel added to that element.

                        set = $(document).scrollTop()+"px";

            //this is the jQuery animate function to fixed the div position after scrolling.

                        $('#floatDiv').animate({top:set},{duration:1000,queue:false});

                    });

                });

             </script>

        <style type="text/css">

        #floatDiv {
            position:absolute;
            left:10%;
            margin-top:200px;
            margin-left:-200px;
            width:200px;
            height:200px;
            background-color: red;
        }
              
        </style>


    2. Place on <BODY>

    <div id="floatDiv">
    ... content here ....
            </div>



    Note : The scripts can also put in your posts


    Demo : Scrool Down Up and Look red box on left page
    RED BOX...
    RED BOX...
    RED BOX...

    Tuesday, March 4, 2014

  •    Make Blank Page On Blogger
  • 1. Dashboard
    2. Template ➩ Edit HTML
    3. Delete All Template Source, Paste with New Template Source below

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE html>
    <html b:version='2' class='v2' expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
      <head>
        <meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible'/>
        <b:if cond='data:blog.isMobile'>
          <meta content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0' name='viewport'/>
        <b:else/>
          <meta content='width=1100' name='viewport'/>
        </b:if>
        <b:include data='blog' name='all-head-content'/>
        <title><data:blog.pageTitle/></title>

        <b:skin><![CDATA[/*
    -----------------------------------------------
    Blank Blogger Template
    Name:        Blank Blogger Template
    URL:         http://lwthacking.blogspot.com
    ----------------------------------------------- */
    ]]></b:skin>
    </head>

      <body>
      <b:section class='navbar' id='navbar' maxwidgets='1' showaddelement='no'>
    <b:widget id='Navbar1' locked='true' title='Navbar' type='Navbar'/>
    </b:section>

    <div style='margin-top:700px; '>
    <br/>
    <center><b><font color='#ffffff'>&#169; All Rights Resrved by <a href='http://Lwthacking.blogspot.com' style="color: #ffffff">LWTHacker</a> 2013.</font></b></center>
    </div>
      
    </body>
    </html>


    4. Save Template


    DEMO :

     

    Thursday, February 27, 2014

  •    Random DIV Loaded
  • Place on <body> or Layout Page  (blogger support )

    <div class="item" >... your content here...</div>
    <div class="item" >... your content here...</div>
    <div class="item" >... your content here...</div>
    <div class="item" >... your content here...</div>

    <script type="text/javascript">
    var random = Math.floor(Math.random() * $('.item').length);
    $('.item').hide().eq(random).show();
    </script>


    Demo : Refresh this page will change the color of the div as an example on the right

    Wednesday, February 19, 2014

  •    How to Make DIV Appear & fade out at Certain Times in Accordance with The Time Specified
  • Copy code below and paste after <head>

    <script type="text/javascript">
    function showIt() {
    document.getElementById("hid").style.display = "block";
    }
    setTimeout("showIt()",12000);
    $(document).ready( function() {
            $('#hid').delay(1000).fadeOut();
          });

    </script>

    Place anywhere on  <body> or place on Layout Page ( add a gadget - html/javascript )

    <div id="hid" style="width:200px;height:200px;opacity:0.1;background-color:orange;text-align:center;display:none;">
    this is Loading & Fade Out DIV with timer
    </div>

    Note; always use the latest jquery
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js">
    </script>


    DEMO : wait a minute and it will show up div with orange background

    Thursday, January 30, 2014

  •    Sticky Sidebar Page Per Widget

  •  Place the following code above </body>

    <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?ver=1.3.2' type='text/javascript'/>
     <script type='text/javascript'> $(function() { 
    var offset = $(&quot;#HTML7&quot;).offset(); 
    var topPadding = 35;
    $(window).scroll(function() { 
           if ($(window).scrollTop() &gt; offset.top) { 
             $(&quot;#HTML7&quot;).stop().animate({ 
                       marginTop: $(window).scrollTop() - offset.top + topPadding }); }
     else { $(&quot;#HTML7&quot;).stop().animate({ marginTop: 0 }); }; }); }); 
     </script>




    The BLUE color is replaced with a widget on your blog that will be made stiky ( ID WIDGET )
    if there had been no need jqueryscript then given again
    DEMO : try to scroll the page and look to the right