Skip to content

Instantly share code, notes, and snippets.

View faruk09's full-sized avatar

Abdullah Al Faruk faruk09

View GitHub Profile
@faruk09
faruk09 / Center Images of Different Sizes in the Middle of a div
Created January 16, 2020 16:59
Center Images of Different Sizes in the Middle of a div
<div class="row centered" >
<div class="col-xs-12 col-sm-4 col-md-2" style="">
<a href="http://example.com/" target="_blank"><img src="cover.png"></a>
</div>
<div class="col-xs-12 col-sm-4 col-md-2" style="">
<a href="http://example.com" target="_blank"><img src=""></a>
</div>
</div>
...........
@faruk09
faruk09 / Load More Button
Created January 16, 2020 08:00
Load More Button
<div class="container text-center">
<div class="row">
<div class="col-md-4">
<div class="content"></div>
</div>
<div class="col-md-4">
<div class="content"></div>
</div>
<div class="col-md-4">
<div class="content"></div>
@faruk09
faruk09 / Owl Carousel Tricks
Last active January 16, 2020 17:25
Owl Carousel Tricks
@faruk09
faruk09 / Isotop Activation + Filtering + Active class add
Created January 8, 2020 03:53
Isotop Activation + Filtering + Active class add
Filtering
--------------------
<div class="row">
<div class="button-group filter-button-group">
<button class="active" data-filter="*">All</button>
<button data-filter=".web">Web</button>
<button data-filter=".apps">Apps</button>
<button data-filter=".icons">Icons</button>
</div>
</div>
PHP Code:
--------------
<?php
// Only process POST reqeusts.
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Get the form fields and remove whitespace.
$name = strip_tags(trim($_POST["name"]));
$name = str_replace(array("\r","\n"),array(" "," "),$name);
$email = filter_var(trim($_POST["email"]), FILTER_SANITIZE_EMAIL);
.custom-accordian .btn{
position: relative;
width: 100%;
text-align: left;
text-decoration: none;
color: #555;
}
.custom-accordian .btn.btn-link:before{
CSS code:
.iframe-container{
position: relative;
width: 100%;
padding-bottom: 56.25%;
height: 0;
}
.iframe-container iframe{
position: absolute;
/* XL Device :1200px. */
@media (min-width: 1200px) and (max-width: 1500px) {
}
/* LG Device :992px. */
@media (min-width: 992px) and (max-width: 1200px) {
<!-- Google Map js -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDC3Ip9iVC0nIxC6V14CKLQ1HZNF_65qEQ "></script>
function basicmap() {
// Basic options for a simple Google Map
// For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions
var mapOptions = {
// How zoomed in you want the map to start at (always required)
zoom: 11,
scrollwheel: false,
// Sticky Navigation
$(window).on('scroll',function() {
var scroll = $(window).scrollTop();
if (scroll < 40) {
$(".sticky").removeClass("scroll-header");
}else{
$(".sticky").addClass("scroll-header");
}
});