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);
});
}
<!-- html structure -->
<a class="popup-youtube" href="https://www.youtube.com/watch?v=UbMCjJsCsok"><span>Watch the setup video</span><figure><img src="svgs/icn_ui_play_large.svg" width="32" height="32" alt="WatchBTN"></figure></a>
<!-- Scripting function -->
<script type="text/javascript">
$(document).ready(function() {
$('.popup-youtube, .popup-vimeo').magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
<head>
<script>
$().ready(function (e) {
$('.slickslide').slick({
dots: true,
infinite: true,
speed: 500,
fade: false,
slide: 'li',
;(function($){
$(function(){
// This function for create separate word from a tag.
$('.hero-content h1').each(function(){
var $_this = $(this);
var words = $_this.text().split(" ");
$_this.empty();
$.each(words, function(i, v){
$_this.append($("<dfn>").text(v + " "));
});
$("ul.tabs").each(function(){
var $_this = $(this);
$_this.find(">li").eq(0).addClass("active");
$_this.parent().find("div.tab-content-wrap > div.pane").hide();
$_this.parent().find("div.tab-content-wrap > div.pane").eq(0).show();
var slider = $('#work-carousel'); // Add yoru slider id here
slider.on('mousewheel DOMMouseScroll', function(event) {
event.preventDefault();
if(event.originalEvent.wheelDelta > 0 || event.originalEvent.detail < 0) {
slider.slick('slickPrev');
function wrapFirstWord () { // This function for select first word.
// Select only the first text node
var node = $("div").contents().filter(function () {
return this.nodeType == 3;
}).first(),
// Get the text...
text = node.text(),
<html !DOCTYPE html>
<head>
<style>
/* Animated cursor style */
.animated-cursor{cursor: none;}
.mood_circle{width: 60px; height: 60px; border-radius: 50%; pointer-events: none; -webkit-transform-origin: center; transform-origin: center; z-index: 99; opacity: 0; transition: .5s opacity ease; transition: .5s opacity ease; position: absolute; display: block;}
.start-event .mood_circle{opacity: .9;}
.mood_circle__inner{position: absolute; top: 0; left: 0; width: 100%; border-radius: 50%; height: 100%; background-color: #40d1bd; transition: .5s -webkit-transform cubic-bezier(.165, .84, .44, 1); transition: .5s transform cubic-bezier(.165, .84, .44, 1); -webkit-transform: scale(0); transform: scale(0) }
$('#searchBox').keyup(function(){
$('div.search-wrap').addClass('value-added')
})
$('#searchBox').blur(function(){
if(!this.value){this.value=this.defaultValue;}
if(this.value==this.defaultValue){
$('div.search-wrap').removeClass('value-added')
}