Wednesday, 18 March 2015

Fade-in effect using CSS3 @keyframes Rule


    With CSS3 @keyframes rules, we can make a fade-in effect for any HTML element we want. In

following code, we are just changing the opacity of an element on two different @keyframes

states. We can increase the fade-in time by animation-duration property.

    HTML Code

        <div class="col1 effect one"> </div>
        <div class="col2 effect two"> </div>
        <div class="col3 effect three"> </div>

    CSS Code

    copytext

        .col1 ,.col2 ,.col3 {border-radius:15px;float: left;padding: 0px 10px;background:

#f9fde4;border: 1px solid #009c65;box-shadow:-8px 10px 0px #adc4d2;}
        .effect {
            opacity:0;
            -webkit-animation:fadeIn ease-in 1;
            -moz-animation:fadeIn ease-in 1;
            animation:fadeIn ease-in 1;
            -webkit-animation-fill-mode:forwards;
            -moz-animation-fill-mode:forwards;
            animation-fill-mode:forwards;
            -webkit-animation-duration:1s;
            -moz-animation-duration:1s;
            animation-duration:1s;
        }
        @-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
        @-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
        @keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
        .effect, .one {
        -webkit-animation-delay: 0.7s;
        -moz-animation-delay: 0.7s;
        animation-delay: 0.7s;
        }
        .effect, .two {
        -webkit-animation-delay: 1.2s;
        -moz-animation-delay:1.2s;
        animation-delay: 1.2s;
        }
        .effect, .three {
        -webkit-animation-delay: 1.6s;
        -moz-animation-delay: 1.6s;
        animation-delay: 1.6s;
        }

For such more blogs kindly visit http://findnerd.com/NerdDigest

Tuesday, 17 March 2015

How to create a Sticky Menu bar with CSS and Jquery


    In this example, we will create a simple webpage that consists of the header, the

navigation and the content.

        <div class="wrapper">
            <div class="header">
                Header
            </div>
            <div class="nav">
                Navigation
            </div>
            <div class="content">
                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown

printer took a galley of type and scrambled it to make a type specimen book. It has survived

not only five centuries, but also the leap into electronic typesetting, remaining essentially

unchanged. It was popularised in the 1960s with the release of Letraset sheets containing

Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker

including versions of Lorem Ipsum <br><br></p>
            </div>
        </div>

    And, we will apply the sticky position to the navigation.

    But first, we will define the styles in the stylesheet, like so.

        body {
            margin: 45px 0 0;
            padding: 0;
            font-family:Arial, Helvetica, sans-serif;
            font-size:12px;
        }
        .header, .nav {
            color: #FFFFFF;
            text-align: center;
        }
        .header {
            background-color: #333333;
            padding: 50px 0;
        }
        .content {
            margin: 10px auto 100px;
            width: 600px;
        }
        .sticky {
            position: fixed;
            width: 100%;
            left: 0;
            top: 0;
            z-index: 100;
            border-top: 0;
        }

    Then, we will apply that class to the navigation conditionally with jQuery.

    copytext

        $(document).ready(function() {
            var stickyNavTop = $('.nav').offset().top;
            var stickyNav = function(){
            var scrollTop = $(window).scrollTop();
                if (scrollTop > stickyNavTop) {  
                    $('.nav').addClass('sticky');
                } else {
                $('.nav').removeClass('sticky');  
                }
            };
            stickyNav();
            $(window).scroll(function() {
                stickyNav();
            });
        });

For such more blogs kindly visit to http://findnerd.com/NerdDigest

Monday, 16 March 2015

How to Make A Simple DropDown in HTML With The Help of Jquery and CSS



        You Can Use Below Code to Make A Simple Drop Down In HTML With The Help Of Jquery And CSS

   

         ***Jquery***
        <script>
        $(function(){
            $('.DropDown > ul > li').on('click', function(){
                $('.DropDown ul ul').slideUp();
                $(this).children('ul').slideDown();
            });
        });
        </script>
        ![<html>
               <div class="DropDown">
                <ul>
                    <li><a href="javascript:void(0);">ONE</a>
                        <ul class="First">
                            <li><a href="javascript:void(0);">1</a></li>
                            <li><a href="javascript:void(0);">2</a></li>
                        </ul>
                    </li>
                    <li><a href="javascript:void(0);">TWO</a>
                        <ul class="Second">
                            <li><a href="javascript:void(0);">3</a></li>
                            <li><a href="javascript:void(0);">4</a></li>
                        </ul>
                        <div class="clr"></div>
                    </li>
                    <li><a href="javascript:void(0);">THREE</a>
                        <ul class="Second">
                            <li><a href="javascript:void(0);">3</a></li>
                            <li><a href="javascript:void(0);">4</a></li>
                        </ul>
                        <div class="clr"></div>
                    </li>
                </ul>
            </div>
        </html>][1]

For such more Blogs visit http://findnerd.com/NerdDigest

How to make use of corcdoc API

Below is a sample code base to convert PDF files to HTML5 template making use of well known

tool Crocdoc :

    $_product = $observer->getProduct();
            $productid=$_product->getId();
            $read = Mage::getSingleton('core/resource')->getConnection('core_read');
              $query = 'SELECT link_file,link_url from downloadable_link where product_id='.

$productid;
            $results = $read->fetchAll($query);
            if($results[0]['link_file']||$results[0]['link_url']){
            if($results[0]['link_file']) {
                $l1=$results[0]['link_file'];
                $link=Mage::getBaseUrl

(Mage_Core_Model_Store::URL_TYPE_MEDIA).'downloadable/files/links'.$l1;
            } else {
                $l1=end(explode('/',$results[0]['link_url']));
                $link=Mage::getBaseUrl

(Mage_Core_Model_Store::URL_TYPE_MEDIA).'downloadable/files/'.$l1;
            }
            Mage::log($link);
            error_reporting(E_ALL);
            $exampleApiToken = 'AXa5RgV6MDQzm9tbKZJYepqI';
            if (php_sapi_name() != 'cli') {
                    header('Content-Type: text/plain');
            }
            $ExternalLibPath=Mage::getModuleDir('', 'Pack_Book') . DS . 'lib' . DS

.'Crocodoc.php';
            require_once ($ExternalLibPath);
            $que = 'SELECT * from catalog_product_response where product_id='.$productid;
            $results1 = $read->fetchAll($que);
            $update=0;
            if($results1[0]['product_id'])
                $update=1;
            //Mage::log($results1[0]['uuid']);
            Crocodoc::setApiToken($exampleApiToken);
            $uuid = null;
            try {
                    $uuid = CrocodocDocument::upload($link);
                    $write = Mage::getSingleton("core/resource")->getConnection("core_write");
                    if($update==0)
                        $query1 = 'INSERT INTO catalog_product_response VALUES ('.

$productid.',"'.$uuid.'")';
                    else
                        $query1 = 'update catalog_product_response set uuid = "'.$uuid.'"

where product_id='.$productid;
                    $write->query($query1);
                    return ;
            } catch (CrocodocException $e) {
                    return ;
            }
            return  ;

For such more Blogs visit to http://findnerd.com/NerdDigest

Tuesday, 10 March 2015

Smoke Font Animation



    Hello Friends, The following codes below is an animation effect of css3 by implementing

this code the fonts will comes in smoke style.

    HTML

       

<h1><span>C</span><span>S</span><span>S</span><span>&nbsp;</span><span>S</span><span>m</span><

span>o</span><span>k</span><span>y</span><span>&nbsp;</span><span>T</span><span>e</span><span>

x</span><span>t</span><span>&nbsp;</span><span>E</span><span>f</span><span>f</span><span>e</sp

an><span>c</span><span>t</span></h1>

    CSS

    copytext

        @import url(http://fonts.googleapis.com/css?family=Finger+Paint);
        body { background: black; overflow: hidden; }
              h1 {
                  font: 5vw/100vh "Finger Paint";
                  text-align: center;
                  color: transparent;
                  backface-visibility: hidden;
                }
                span {
                  display: inline-block;
                  text-shadow: 0 0 0 whitesmoke;
                  -webkit-animation: smoky 5s both;
                  animation: smoky 5s both;
                }
                span:nth-child(even){
                  animation-name: smoky-mirror;
                }
                @keyframes smoky {
                  60% {
                    text-shadow: 0 0 40px whitesmoke;
                  }
                  to {
                    transform:
                      translate3d(15rem,-8rem,0)
                      rotate(-40deg)
                      skewX(70deg)
                      scale(1.5);
                    text-shadow: 0 0 20px whitesmoke;
                    opacity: 0;
                  }
                }
                @keyframes smoky-mirror {
                  60% {
                    text-shadow: 0 0 40px whitesmoke; }
                  to {
                    transform:
                      translate3d(18rem,-8rem,0)
                      rotate(-40deg)
                      skewX(-70deg)
                      scale(2);
                     text-shadow: 0 0 20px whitesmoke;
                    opacity: 0;
                  }
                }
                @for $item from 1 through 21 {
                  span:nth-of-type(#{$item}){
                    animation-delay: #{($item/10)}s;
                  }

    }

For more kindly visit http://findnerd.com/NerdDigest

Sunday, 8 March 2015

Make a Div Align Center Using J-query

Hello Readers !

Here is an example, how to make a div always center align using jquery. You can do this using

css but this method will work with positions (absolute, fixed etc) and it is also compatible

with internet explorer.

    <script>
        $(document).ready(function(){
          var windowWidth = $(window).width();
          var divWidth = $("div").width();
          $("div").css({"margin-left":(windowWidth-divWidth)/2});
        });
    </script>

For more kindly visit http://findnerd.com/NerdDigest/Html

Sunday, 1 March 2015

Example of parallax

Hello Readers !
Here is an example of parallax with simple script and it is also compatible with internet

explorer.
Script :-

copytext

    <script type="text/javascript">
        $(document).ready(function() {
            $(window).bind('scroll',function(){
                parallax();
            })
        })
         function parallax(){
                var scrollposition=$(window).scrollTop();
                $('.ground').css('top',(0 - (scrollposition * .1))+'px')
                $('.box').css('top',(0 + (scrollposition * 1.2))+'px')
             }
        </script>

html

    <div class="main">
        <div class="ground" id="base"></div>
        <div class="box"></div>
    </div>

Tags
JQuery html parallax

For More Kindly visit to http://findnerd.com/NerdDigest