Skip to content

Instantly share code, notes, and snippets.

View DevShahidul's full-sized avatar
🎯
Focusing

Shahidul Islam DevShahidul

🎯
Focusing
  • http://webtricker.com/
View GitHub Profile
if($('#chosefile').length){
$('#chosefile').change(function(e){
var fileName = e.target.files[0].name;
$(".attach-btn-wrap span").text(fileName);
});
}
<h1><small>Fullscreen</small> Ken Burns effect <small>without javascript</small></h1>
<!-- You can add more ".slideshow-image" elements, but remember to update the "$items" variable on SCSS -->
<div class="slideshow">
<div class="slideshow-image" style="background-image: url('https://source.unsplash.com/category/nature/1600x1400')"></div>
<div class="slideshow-image" style="background-image: url('https://source.unsplash.com/category/buildings/1600x1400')"></div>
<div class="slideshow-image" style="background-image: url('https://source.unsplash.com/category/food/1600x1400')"></div>
<div class="slideshow-image" style="background-image: url('https://source.unsplash.com/category/technology/1600x1400')"></div>
</div>
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: avenir,sans-serif;
}
.video_wrapper {
width: 560px;
margin: 0 auto;
var preload = document.getElementById("main-preloader");
window.addEventListener("load", function(){
//preload.style.animation = " fadeOut 1s ease"
preload.style.display = " none"
})
<!-- Html Markup -->
<div class="product-details-wrap" id="product-details-wrap">
<div class="product-item-info scroll-effect">
<span class="economic"> Economics</span>
<h6>e-Marefa DataBank for Islamic Economics and Finance</h6>
<p>An integrated set of databases containing tens of thousands of records from 300 institutions in 40 countries.</p>
<a href="#">View Service</a>
</div>
<div class="product-item-info scroll-effect">
@DevShahidul
DevShahidul / count Down.js
Created June 10, 2018 12:27
See example here >>> http://jsfiddle.net/GNrUM/ or find on Oliver Whyte project
var sec = 2
var timer = setInterval(function() {
$('#hideMsg span').text(sec--);
if (sec == -1) {
$('#hideMsg').fadeOut('fast');
clearInterval(timer);
}
}, 1000);
$(window).scroll(function() {
var theta = $(window).scrollTop() / 800 % Math.PI;
$('#leftgear').css({ transform: 'rotate(' + theta + 'rad)' });
$('#rightgear').css({ transform: 'rotate(-' + theta + 'rad)' });
});
// Parallax effect
if($(".parallax-section").length){
var winScrollTop=0;
$.fn.is_on_screen = function(){
var win = $(window);
var viewport = {
top : win.scrollTop(),
left : win.scrollLeft()
};
//viewport.right = viewport.left + win.width();
(function($){
$(function(){
$('.main-nav ul li a').on('click', function(e) {
$(".main-nav ul li").removeClass("current-menu-item");
$(this).parent().addClass("current-menu-item");
if($(window).width() <= 767 ){
$(".navigation-wrapper").removeClass("navShown");
$( document ).ready(function() {
console.log( "document ready!" );
var $sticky = $('.sticky');
var $stickyrStopper = $('.sticky-stopper');
if (!!$sticky.offset()) { // make sure ".sticky" element exists
var generalSidebarHeight = $sticky.innerHeight();
var stickyTop = $sticky.offset().top;
var stickOffset = 0;