Posts

Bootstrap 3: Equal Height Columns with jQuery

When you want height of each have the same height using coloumn of Bootstrap my recommend you should Javascript calculate height of each row if you using css maybe not support all browser. 1. Html Code <div class="row eq-heights">       <div class="eq-col-sm-4 eq-col-md-4 col-md-4">       <div class="content clearfix">column 1 first in source </div>        </div>     <div class="eq-col-sm-4 eq-col-md-4 col-md-4">         <div class="content clearfix">col 2 second in source </div>        </div>     <div class="eq-col-sm-4 eq-col-md-4 col-md-4">         <div class="content clearfix"> Third in source. something fdaf fafdafd  dafdafdafdaf fdafdf ffdfdfd something fdaf fafdafd  dafdafdafdaf fdafdf ffdfdfd something fdaf...

jQuery to hide a DIV when the user clicks outside of container

- Html code <a href="#" class="select-link">Select List</a> <ul class="dropdown-menu-list">     <li><a href="#">My item name 1</a></li>     <li><a href="#">My item name 2</a></li>     <li><a href="#">My item name 3</a></li>     <li><a href="#">My item name 4</a></li> </ul> - Css Code .dropdown-menu-list {display:none;} - jQuery Code $(".select-link").on('click',function(e) {     e.preventDefault();     $(".dropdown-menu-list").show(); }) $(document).mouseup(function (e) {     var container = $("YOUR CONTAINER SELECTOR");     if (!container.is(e.target) // if the target of the click isn't the container...         && container.has(e.target).length === 0) // ... nor a descendant of the contain...

jQuery split long ul list to multiple UL

1. HTML code <ul id="bigList"> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem</li> <li>Elem...

Scroll to bottom of image when mouse over

1. Css Code <style type="text/css">             .image-bg {                 margin:0;                 padding:0;                 background-image: url("landingpage_07.jpg");                 background-repeat: no-repeat;                 display: inline-block;                 height: 344px;                 padding-top: 31px;                 position: relative;                 width: 457px;   ...

Exclude weekends on jQuery datepicker

$ ( 'yourSelector' ). datepicker ({ minDate : 0 , // your min date maxDate : '+1w' , // one week will always be 5 business day - not sure if you are including current day beforeShowDay : $ . datepicker . noWeekends // disable weekends });

Disable all Sundays in jQuery UI Calendar (datepicker)

$ ( "#datepicker" ). datepicker ({ beforeShowDay : function ( date ) { var day = date . getDay (); return [( day != 0 ), '' ]; } });

Javascript random number between two numbers

function getRandomInt(min, max) {   return Math.floor(Math.random() * (max - min)) + min; } console.log(getRandomInt(1,100));