Advertisement
Guest User

header

a guest
Jun 26th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.58 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.    <head <?php echo $header;?>>
  4.       <meta charset="utf-8">
  5.       <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.       <meta name="viewport" content="width=device-width, initial-scale=1">
  7.       <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
  8.       <meta name="description" content="">
  9.       <meta name="author" content="">
  10.       <link rel="icon" href="<?php echo base_url('assets/img/favicon.png');?>">
  11.       <title><?php echo $title;?></title>
  12.  
  13.       <link rel="stylesheet" href="<?php echo base_url('assets/stylesheets/font-awesome.min.css');?>" media="screen" title="no title" charset="utf-8">
  14.       <link href="<?php echo base_url('assets/stylesheets/styles.css');?>" rel="stylesheet">
  15.       <link href="<?php echo base_url('assets/stylesheets/slider.css');?>" rel="stylesheet">
  16.       <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  17.       <script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
  18.       <script type="text/javascript">var switchTo5x=true;</script>
  19.  
  20.      
  21.       <!-- black n white
  22.     <script src="<?php echo base_url('assets/js/grayscale.js');?>"></script>
  23.      -->
  24.  
  25.         <!-- stinky atas -->
  26.         <script type='text/javascript'>
  27.           //<![CDATA[
  28.          $(document).ready(function() {
  29.              // Menentukan elemen yang dijadikan sticky yaitu .atas
  30.              var stickyNavTop = $('.atas').offset().top;
  31.              var stickyNav = function(){
  32.                  var scrollTop = $(window).scrollTop();  
  33.                  // Kondisi jika discroll maka menu akan selalu diatas, dan sebaliknya        
  34.                  if (scrollTop > stickyNavTop) {
  35.                      $('.atas').css({ 'position': 'fixed', 'top':0, 'width':'100%',  'z-index':9999 });
  36.                  } else {
  37.                      $('.atas').css({ 'position': 'relative' });
  38.                  }
  39.              };
  40.              // Jalankan fungsi
  41.              stickyNav();
  42.              $(window).scroll(function() {
  43.                  stickyNav();
  44.              });
  45.          });
  46.          //]]>
  47.         </script>
  48.    
  49.    
  50.      
  51.      
  52.      
  53.      
  54.         <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
  55.         <style type="text/css">
  56.         .back-to-top {
  57.         cursor: pointer;
  58.         position: fixed;
  59.         bottom: 0;
  60.         right: 20px;
  61.         display:none;
  62.         }
  63.       </style>
  64.  
  65.  
  66.    
  67.    </head>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement