Signin  Pricing  Examples  Support

Libraries > main.js

main.js - Search Live Website Code
It's like doing CTRL+F on millions of websites' source code



NerdyData is a search engine for source code. Search the source code of 200 million websites.


JAVASCRIPT FILE http://ebela.in/js/ebela/main.js

Function Explorer







Libraries on ebela.in


datemapping.js

fancybox.pack.js

isotope.pkgd.min.js

jquery.bxslider.min.js

jquery.cookie.js

jquery.li-scroller.1.0.js

jquery.min.js

main.js

owl.carousel.min.js

loader.js

opinion.js

righttab.js



Explore More


ds-sleight.js

cookies.js

translate.js

prototype.js

main.js
				
$(function(){var control='';$("ul.navbar-nav > li").each(function(){if(window.location.href.indexOf($(this).find('a').attr('href'))>=0){$(this).parents().eq(1).find('a').first().removeClass('top_menu_actv');$(this).find('a').removeClass('top_menu_actv').addClass('top_menu_actv');}
else{$(this).find('a').removeClass('top_menu_actv');}});$("ul.dropdown-menu > li").each(function(){if(window.location.href.indexOf($(this).find('a').attr('href'))>=0){$("ul.navbar-nav > li").each(function(){$(this).find('a').removeClass('top_menu_actv');});$(this).parents().eq(1).find('a').first().removeClass('top_menu_actv').addClass('top_menu_actv');}});});function rearrangeIsotope(){var hashFilter=location.hash.substr(1);var mainEl=$('#main');var transitionDuration=800;var columnWidth=310;mainEl.isotope({filter:hashFilter,animationEngine:'best-available',animationOptions:{duration:transitionDuration},containerStyle:{position:'relative',overflow:'visible'},masonry:{columnWidth:columnWidth}});function setSizes(){var availableSpace='100%';var potentialColumns=availableSpace/columnWidth;potentialColumns=Math.floor(potentialColumns);var newWidth=potentialColumns*columnWidth;$('.container').width(newWidth);}
setSizes();function layoutTimer(){setTimeout(function(){mainEl.isotope('layout');},transitionDuration);}
layoutTimer();$(window).resize(function(){setSizes();layoutTimer();});var currentCats=hashFilter.split(".");currentCats.splice(0,1);for(current in currentCats){currentCat=currentCats[current];currentCats[current]='.'+ currentCat;$('#controls a[href=#'+currentCat+']').parent().addClass('active');}
$('#controls a').click(function(){var catClass='.'+$(this).attr('href').substr(1);if($.inArray(catClass,currentCats)==-1){currentCats.push(catClass);$(this).parent().addClass('active');}
else{position=$.inArray(catClass,currentCats);currentCats.splice(position,1);$(this).parent().removeClass('active');}
var newFilter="";for(current in currentCats){currentCat=currentCats[current];newFilter=newFilter+ currentCat;}
location.hash=newFilter;mainEl.isotope({filter:newFilter});return false;});}
document.onreadystatechange=function(e)
{rearrangeIsotope();};$(document).on('click',".photos",function(e){$('#search_div').slideUp();});$(document).on('click',".nanabidh",function(e){$('#search_div').slideUp();});$(document).on('click',function(e){if(e.target.id!=="search_li"&&e.target.id!=="search_li_mob"&&$(e.target).parents("#search_div").size()===0){$('#search_div').slideUp();}});$(document).on('click',"#search_li",function(e){var elem100=$(e.target).closest('#search_li'),box100=$(e.target).closest('#search_div');e.preventDefault();if(elem100.length){}else if(!box100.length){console.log("function => "+e.target.id);$('#search_div').slideUp();}});$(document).on('click',"#search_li_mob",function(e){var elem100=$(e.target).closest('#search_li_mob'),box100=$(e.target).closest('#search_div');e.preventDefault();if(elem100.length){$('#search_div').slideToggle("slow");}else if(!box100.length){$('#search_div').slideUp();}});$(document).on('click',function(e){var elem3=$(e.target).closest('#id3'),box3=$(e.target).closest('#login_div');if(elem3.length){e.preventDefault();$('#login_div').slideToggle("slow");}else if(!box3.length){$('#login_div').slideUp();}});$(document).on('click',function(e){var elem4=$(e.target).closest('#register_but'),box4=$(e.target).closest('#register_div');if(elem4.length){e.preventDefault();$('#register_div').slideToggle("slow");$('#login_div').slideUp();}else if(!box4.length){$('#register_div').slideUp();}});$(document).on('click',function(e){var elem5=$(e.target).closest('#register_frm_login'),box5=$(e.target).closest('#register_div');if(elem5.length){e.preventDefault();$('#register_div').slideToggle("slow");$('#login_div').slideUp();}});$(document).on('click',function(e){var elem6=$(e.target).closest('#more_link'),box6=$(e.target).closest('#more_div');if(elem6.length){e.preventDefault();$('#more_div').slideToggle("slow");}else if(!box6.length){$('#more_div').slideUp();}});$(document).on('click',function(e){var elemweather=$(e.target).closest('#weather_link'),boxweather=$(e.target).closest('#weather_div');if(elemweather.length){e.preventDefault();$('#weather_div').slideToggle("slow");}else if(!boxweather.length){$('#weather_div').slideUp();if($('#weather_link').children().find('#plus').attr('src')=="/img/ebela/minus_icon.png")
$('#weather_link').children().find('#plus').attr('src',"/img/ebela/plus.png")}
var srcWeather=$(e.target).closest('#weather_link').children().find('#plus').attr('src');if(srcWeather=="/img/ebela/plus.png"){$(e.target).closest('#weather_link').children().find('#plus').attr('src',"/img/ebela/minus_icon.png");}else{$(e.target).closest('#weather_link').children().find('#plus').attr('src',"/img/ebela/plus.png");}});$(document).on('click',function(e){var elem2=$(e.target).closest('#horoscope_link'),box2=$(e.target).closest('#horoscope_div');if(elem2.length){e.preventDefault();$('#horoscope_div').slideToggle("slow");}else if(!box2.length){$('#horoscope_div').slideUp();if($('#horoscope_link').children().find('#plus').attr('src')=="/img/ebela/minus_icon.png")
$('#horoscope_link').children().find('#plus').attr('src',"/img/ebela/plus.png")}
var srcHoroscopeCtrl=$(e.target).closest('#horoscope_link').children().find('#plus');if($(srcHoroscopeCtrl).attr('src')=="/img/ebela/plus.png"){$(srcHoroscopeCtrl).attr('src',"/img/ebela/minus_icon.png");}else{$(srcHoroscopeCtrl).attr('src',"/img/ebela/plus.png");}});$(document).on('click',function(e){var elem2=$(e.target).closest('#quote_link'),box2=$(e.target).closest('#quote_div');if(elem2.length){e.preventDefault();$('#quote_div').slideToggle("slow");}else if(!box2.length){$('#quote_div').slideUp();if($('#quote_link').children().find('#plus').attr('src')=="/img/ebela/minus_icon.png")
$('#quote_link').children().find('#plus').attr('src',"/img/ebela/plus.png")}
var srcQuoteCtrl=$(e.target).closest('#quote_link').children().find('#plus');if($(srcQuoteCtrl).attr('src')=="/img/ebela/plus.png"){$(srcQuoteCtrl).attr('src',"/img/ebela/minus_icon.png");}else{$(srcQuoteCtrl).attr('src',"/img/ebela/plus.png");}});$(document).on('click',function(e){var elem2=$(e.target).closest('#photo_gallery_link'),box2=$(e.target).closest('#photo_gallery_div');if(elem2.length){e.preventDefault();$('#photo_gallery_div').slideToggle("slow");}else if(!box2.length){$('#photo_gallery_div').slideUp();if($('#photo_gallery_link').children().find('#plus').attr('src')=="/img/ebela/minus_icon.png")
$('#photo_gallery_link').children().find('#plus').attr('src',"/img/ebela/plus.png")}
var srcPhotoCtrl=$(e.target).closest('#photo_gallery_link').children().find('#plus');if($(srcPhotoCtrl).attr('src')=="/img/ebela/plus.png"){$(srcPhotoCtrl).attr('src',"/img/ebela/minus_icon.png");}else{$(srcPhotoCtrl).attr('src',"/img/ebela/plus.png");}});$(document).on('click',function(e){var elem2=$(e.target).closest('#weather_link_mob'),box2=$(e.target).closest('#weather_div_mob');if(elem2.length){e.preventDefault();$('#weather_div_mob').slideToggle("slow");}else if(!box2.length){$('#weather_div_mob').slideUp();}});$(document).on('click',function(e){var elem2=$(e.target).closest('#horoscope_link_mob'),box2=$(e.target).closest('#horoscope_div_mob');if(elem2.length){e.preventDefault();$('#horoscope_div_mob').slideToggle("slow");}else if(!box2.length){$('#horoscope_div_mob').slideUp();}});$(document).on('click',function(e){var elem2=$(e.target).closest('#trending_link'),box2=$(e.target).closest('#trending_div');if(elem2.length){e.preventDefault();$('#trending_div').slideToggle("slow");}else if(!box2.length){$('#trending_div').slideUp();}
var elem3=$(e.target).closest('#most_read_link'),box3=$(e.target).closest('#most_read_div');if(elem3.length){e.preventDefault();$('#most_read_div').slideToggle("slow");}else if(!box3.length){$('#most_read_div').slideUp();}
var elem4=$(e.target).closest('#most_recent_link'),box4=$(e.target).closest('#most_recent_div');if(elem4.length){e.preventDefault();$('#most_recent_div').slideToggle("slow");}else if(!box4.length){$('#most_recent_div').slideUp();}
var elem5=$(e.target).closest('#editors_choice_link'),box5=$(e.target).closest('#editors_choice_div');if(elem5.length){e.preventDefault();$('#editors_choice_div').slideToggle("slow");}else if(!box5.length){$('#editors_choice_div').slideUp();}
var elem43=$(e.target).closest('#more_link'),box43=$(e.target).closest('#more_detail_div');if(elem43.length){e.preventDefault();$('#more_detail_div').slideToggle("slow");}else if(!box43.length){$('#more_detail_div').slideUp();}});$(document).ready(function(){var totalItems=$('#storyimage .imgpho').length;var currentIndex=$('#storyimage div.active.imgpho').index()+ 1;$('.num').html('PHOTOS: '+currentIndex+' / '+totalItems+'');$('#myCarousel').on('slid.bs.carousel',function(){if($('#storyimage div.active.imgpho').index()>=3&&$('#storyimage div.active.imgpho').index()<=8){currentIndex=$('#storyimage div.active.imgpho').index();var totalItems=$('.carousel-inner').find('.imgpho').length;$('.num').html('PHOTOS: '+currentIndex+' / '+totalItems+'');}else if($('#storyimage div.active.imgpho').index()>8){currentIndex=$('#storyimage div.active.imgpho').index()-1;var totalItems=$('.carousel-inner').find('.imgpho').length;$('.num').html('PHOTOS: '+currentIndex+' / '+totalItems+'');}else{if($('#storyimage div.active.imgpho').index()==-1){$('.num').html('Advertisement');}else{currentIndex=$('#storyimage div.active.imgpho').index()+ 1;var totalItems=$('.carousel-inner').find('.imgpho').length;$('.num').html('PHOTOS: '+currentIndex+' / '+totalItems+'');}}});});$(document).ready(function(){$("#owl-demo11").owlCarousel({autoWidth:true,lazyLoad:true,loop:true,navigation:true,});$("#owl-demo").owlCarousel({items:5,lazyLoad:true,loop:true,responsiveClass:true,responsive:{0:{items:3,},480:{items:3,},991:{items:4,},1280:{items:5,loop:false}}});$("#owl-demo2").owlCarousel({items:5,lazyLoad:true,responsiveClass:true,responsive:{0:{items:3,},480:{items:3,},991:{items:4,},1280:{items:5,loop:false}}});$("#owl-demo3").owlCarousel({items:5,lazyLoad:true,responsiveClass:true,responsive:{0:{items:3,},480:{items:3,},991:{items:4,},1280:{items:5,loop:false}}});$("#owl-demo10").owlCarousel({items:5,lazyLoad:true,responsiveClass:true,responsive:{0:{items:3,},480:{items:3,},991:{items:4,},1280:{items:5,loop:false}}});if(($(window).height()+ 100)<$(document).height()){$('#top-link-block').removeClass('hidden').affix({offset:{top:100}});}});$(function(){$(document).on('scroll',function(){if($(window).scrollTop()>400){$('.footer_mob_ad').addClass('show');}else{$('.footer_mob_ad').removeClass('show');}});});$(function(){$(document).on('scroll',function(){if($(window).scrollTop()>100){$('.scroll-top-wrapper').addClass('show');}else{$('.scroll-top-wrapper').removeClass('show');}});$('.scroll-top-wrapper').on('click',scrollToTop);});function scrollToTop(){verticalOffset=typeof(verticalOffset)!='undefined'?verticalOffset:0;element=$('body');offset=element.offset();offsetTop=offset.top;$('html, body').animate({scrollTop:offsetTop},500,'linear');}
$(document).ready(function(){$('.orange_bg').hover(function(){$(this).stop().animate({'left':'0px'});},function(){$(this).stop().animate({'left':'-190px'});});});function removeMobFooter(){$('.footer_mob_ad').remove();$('.cross-mob-ad').remove();}


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z