Skip to content

Instantly share code, notes, and snippets.

View bulbul84's full-sized avatar

Md Bulbul Hasan bulbul84

View GitHub Profile
@bulbul84
bulbul84 / Magnific-Popup-Jumping.js
Last active August 2, 2018 16:51
Magnific Popup Jumping Problem Fixed
$('.open-link').magnificPopup({
type: 'image',
closeOnBgClick: true,
fixedContentPos: false,
callbacks: {
open: function() {
jQuery('body').addClass('noscroll');
},
close: function() {
jQuery('body').removeClass('noscroll');
@bulbul84
bulbul84 / index.html
Created August 8, 2018 07:19
Bootstrap carousel. Hide 'previous' and 'next' buttons on first and last slide
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="8000">
<!--====/ Slider Pagination /=====-->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<!--====/ Single Slider /=====-->
@bulbul84
bulbul84 / Resize PSD Width to Match Bootstrap width (1170px)
Last active August 16, 2018 17:51
Resize PSD Width to Match Bootstrap width (1170px)
Calculating Process:
Fullwidth of PSD Document * Bootstrap Width(1170px) = Results / PSD Document Content Width = Final Result.
2800 * 1170 = 3276000 / 2500 = 1310 Resize Image
@bulbul84
bulbul84 / jquery.prettyPhoto.js
Created October 11, 2018 07:26
Jquery PrettyPhoto removing #prettyphoto from URL
a) This worked for me:
function clearHashtag(){
if(location.href.indexOf('#prettyPhoto')!==-1)
location.hash="";
}
This code is at the bottom of jquery.prettyPhoto.js
b) There is another way, like setting: deeplinking: false at the beginning of jquery.prettyPhoto.js.
<?php
//loop er bahire
$a = 0;
$active_class = '';
loop er bitore
while (condition goes here):
@bulbul84
bulbul84 / index.html
Created May 18, 2019 10:31
Owl carousel numbered pagination - pure css metod
<div class="owl-carousel">
<div> Slide 1 </div>
<div> Slide 2 </div>
<div> Slide 3 </div>
<div> Slide 4 </div>
<div> Slide 5 </div>
<div> Slide 6 </div>
<div> Slide 7 </div>
</div>
@bulbul84
bulbul84 / gist:07cae62b0baa6e82322fae41650e5981
Last active July 20, 2019 08:56
scroll certain/specific section from bootstrap modal popup
// Modal Trigger
<a class="terms_scroll" href="#" data-toggle="modal" data-target="#privacyPolicy" data-section="section-1"> Subscription Services</a>
//Model window scroll to subscription renewal section script
$(document).ready(function(){
$('#privacyPolicy').on('shown.bs.modal', function(event) {
// reset the scroll to top
$('#privacyPolicy .privacy_policy_content').scrollTop(0);
// get the section using data
var section = $(event.relatedTarget).data('section');
@bulbul84
bulbul84 / commandPrompt.txt
Created July 23, 2019 17:21
Find PHP version on windows command line
https://stackoverflow.com/questions/15517718/find-php-version-on-windows-command-line
@bulbul84
bulbul84 / index.html
Created July 24, 2019 20:04
Show-Hide based on Select Option jQuery
<style>/* https://gist.github.com/toddparker/32fc9647ecc56ef2b38a */
/* Some basic page styles */
body {
font: 100%/1.5 AvenirNext-Regular, Corbel, "Lucida Grande", "Trebuchet Ms", sans-serif;
color: #111;
background-color: #fff;
margin: 2em 10%
}
@bulbul84
bulbul84 / index.html
Created July 31, 2019 11:07
Play YouTube or Vimeo Video in Modal - Bootstrap 4
<div class="container">
<h1>Play YouTube or Vimeo Videos in Bootstrap 4 Modal</h1>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary video-btn" data-toggle="modal" data-src="https://www.youtube.com/embed/Jfrjeg26Cwk" data-target="#myModal">
Play Video 1 - autoplay
</button>
<!-- Button trigger modal -->