BGR est une destination en ligne de premier plan pour les actualités et les commentaires axés sur les marchés de l’électronique grand public mobile et général. C’est la première source d’actualités mobiles exclusives et de dernière minute aux États-Unis, et un leader dans la catégorie des technologies parmi les premiers utilisateurs, les technophiles avertis et les lecteurs occasionnels. Suite
Suivez-nous sur
Copyright 2021 Zee Entertainment Enterprises Limited
`;
$(document).ready(function(){
$('meta[property="og:site_name"]').attr('content', 'BGR India');
addcounter = 0;
currentrequesturl = gallery_info.gallery_info.url;
//console.log("Gallery URI :" + gallery_info.gallery_info.url);
gallery_info.category_galleries = $("#first_gallery_bottom_content").html();
$("#first_gallery_bottom_content").html("");
isAjax = true;
photoGalleryCurrentSlidId = parseInt(initialPicLoadCount);
photoGalleryCurrentId = 1;
galleryIsScrolled = true;
$(window).scroll(function(e){
//console.log("Scrolled step 1");
e.preventDefault();
//hideSticky();
update_prev_current_next();
//updateTitleUrl();
//console.log("Scrolled step 2");
var height = $(document).height();
var scrollTop = $(window).scrollTop();
var divObj = $("#bgr-photo-gallery .checkClass").last();
if(divObj.length > 0){
var divTopHeight = Math.round(divObj.offset().top); //+parseInt(divObj.height())
} else {
divObj = $("#bgr-photo-gallery .vert_slide_wrap").last();
var divTopHeight = Math.round(divObj.offset().top); //+parseInt(divObj.height())
}
if(window.innerWidth > 767){
divTopHeight = divTopHeight-150;
} else {
divTopHeight = divTopHeight-530;
}
if((scrollTop >= divTopHeight) && galleryIsScrolled == true){
//console.log("Scrolled step 3 scrollTop : " , + scrollTop + " >= divTopHeight : " + divTopHeight + " & galleryIsScrolled : " + galleryIsScrolled );
galleryIsScrolled = false;
$("#bgr-photo-gallery-"+photoGalleryCurrentId+" .main_wrap .vert_slide_wrap").removeAttr('style');
$("#bgr-photo-gallery-"+photoGalleryCurrentId+" .vert_slide_wrap").each(function(){
if(!$(this).hasClass('checkClass')){
$(this).addClass('checkClass');
}
});
//console.log( "Step 1 : " + photoGalleryCurrentId + " "+ photoGalleryCurrentSlidId );
galleryImageAppend(gallery_images, photoGalleryCurrentSlidId, photoGalleryCurrentId);
if((photoGalleryCurrentSlidId == parseInt(gallery_images.length)-initialPicLoadCount) && firstGalleryCheck == false){
var firstGalleryCheck = true;
var galleryLen = parseInt(gallery_images.length)-initialPicLoadCount;
//console.log( "Step 2 : " + photoGalleryCurrentId + " "+ photoGalleryCurrentSlidId );
galleryImageAppend(gallery_images, parseInt(photoGalleryCurrentSlidId)+1, photoGalleryCurrentId);
//console.log( "Step 3 : " + photoGalleryCurrentId + " "+ photoGalleryCurrentSlidId );
galleryImageAppend(gallery_images, parseInt(photoGalleryCurrentSlidId)+2, photoGalleryCurrentId);
} else {
var galleryLen = gallery_images.length;
}
if( photoGalleryCurrentSlidId == galleryLen && isAjax ) {
galleryURL = gallery_info.gallery_info.url;
$("#bgr-photo-gallery-"+photoGalleryCurrentId+" .article-content").append(gallery_info.category_galleries);
var fbcommentscode="
$("#bgr-photo-gallery-"+photoGalleryCurrentId+" .article-content .trending").html( $('#bgr-photo-gallery-1 .article-content .trending').html() );
//FB.XFBML.parse();
$("#bgr-photo-gallery-"+photoGalleryCurrentId+" .bgr-interest").html(gallery_info.gallery_info.bottom_galleries);
//console.log("isAjax Flag : " + isAjax );
if( isAjax == true && next_gallery_url != '' && next_gallery_url != null ) {
isAjax = false;
//console.log("Making Next Galery ready");
$.ajax({
url : '/wp-content/themes/bgr2017/single-photo-gallery-infinite-scroll-ajax.php',
method: 'GET',
data : { 'galid' : next_gallery_url },
success: function(result){
console.log("After Ajax - New Gallery URL:" + result.gallery_info.url );
//var result_gallery_info_id = result.gallery_info.url;
//result_gallery_info_id = result_gallery_info_id.substr(0, result_gallery_info_id.lastIndexOf("-"));
//currentrequesturl = result_gallery_info_id;
currentrequesturl = result.gallery_info.url;
if( result.next_gallery != null ) {
next_gallery_url = result.next_gallery.url;
}else {
next_gallery_url="";
}
gallery_info = result;
gallery_images = result.gallery_images;
photoGalleryCurrentId++;
if( gallery_images != null && gallery_images.length > 0 ){
addGallery(gallery_info);
/*if(window.innerWidth > 767){
addGallery(gallery_info);
} else {
addGalleryMobile(gallery_info);
} */
photoGalleryCurrentSlidId = 0;
isAjax = true;
galleryIsScrolled = true;
//console.log("AJAX Received Successfully now isAjax Flag : " + isAjax );
//console.log("AJAX Received Successfully now galleryIsScrolled Flag : " + galleryIsScrolled );
galleryImageAppend(gallery_images, photoGalleryCurrentSlidId, photoGalleryCurrentId);
$("#bgr-photo-gallery-"+photoGalleryCurrentId+" .vert_slide_wrap").each(function(){
if(!$(this).hasClass('checkClass')){
$(this).addClass('checkClass');
}
});
photoGalleryCurrentSlidId++;
tabScript();
} else {
console.log("Gallery " + result.gallery_info.url + " do not have any Images." );
}
}
});
}
}
if( gallery_images.length > photoGalleryCurrentSlidId ) {
//galleryImageAppend(gallery_images, photoGalleryCurrentSlidId, photoGalleryCurrentId);
photoGalleryCurrentSlidId++;
galleryIsScrolled = true;
}
}
});
});
'+ '