';
}
else {
htmlNature += '
';
}
}
$('#natureNews').html(htmlNature);
$(function () {
$('#natureNews img').each(function () {
$(this).attr('src', $(this).attr('data-src'));
});
});
$('#secNationalStories').show();
$('#secNationalStories').show();
$("#divMainDeshVidesh").show();
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindLowerNews();
}, 500);
}
else {
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindLowerNews();
}, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindLowerNews();
}, 500);
}
});
}
}
// Section 4 Functions End
//Section 5 Functions Start
function BindLowerNews() {
//$("#divLoadImage").show();
//if ($('#divLowerNewsSection').html().trim() == "") {
$.ajax({
url: urlMultiCatDataPradeshiki,
//data: { "CatID": 1, "scatid": 20, "days": "-" + $("#hdnDays").val() },
data: { "CatName": "states" },
type: 'GET',
dataType: 'json',
crossDomain: true,
//async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
// alert(result.length);
if (result !== null && result.length > 0) {
//alert(result[0].Stories[0]);
//var htmlSubCatStories = "";
var ResultCount = 15;
if (result.length < 15) {
ResultCount = result.length;
}
//for (var i = 0; i < ResultCount; i++) {
// if (result[i].Stories !== null && result[i].Stories !== undefined) {
// htmlSubCatStories += '
';
// }
//}
//$("#divLowerNewsSection").html(htmlSubCatStories);
if (result[0].Stories.StoryImageThumb !== null && result[0].Stories.StoryImageThumb !== "" && result[0].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews").attr("href", result[0].Stories.redirectURL)
$("#imghomeBigNews").attr("src", $("#hdnStoryImage").val() + result[0].Stories.StoryImageThumb)
$("#imghomeBigNews").prop("alt", result[0].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews-2").attr("href", result[0].Stories.redirectURL)
$("#urlimghomeBigNews-2").html(result[0].Stories.StoryHeading)
$("#time-desh").html(result[0].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews").attr("href", result[0].Stories.redirectURL)
$("#imghomeBigNews").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews").prop("alt","deshbandhu");
$("#urlimghomeBigNews-2").attr("href", result[0].Stories.redirectURL)
$("#urlimghomeBigNews-2").html(result[0].Stories.StoryHeading)
$("#time-desh").html(result[0].Stories.UpdatedDate)
}
if (result[1].Stories.StoryImageThumb !== null && result[1].Stories.StoryImageThumb !== "" && result[1].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews1").attr("href", result[1].Stories.redirectURL)
$("#imghomeBigNews1").attr("src", $("#hdnStoryImage").val() + result[1].Stories.StoryImageThumb)
$("#imghomeBigNews1").prop("alt", result[1].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews1-2").attr("href", result[1].Stories.redirectURL)
$("#urlimghomeBigNews1-2").html(result[1].Stories.StoryHeading)
$("#time-desh1").html(result[1].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews1").attr("href", result[1].Stories.redirectURL)
$("#imghomeBigNews1").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews1").prop("alt", "deshbandhu");
$("#urlimghomeBigNews1-2").attr("href", result[1].Stories.redirectURL)
$("#urlimghomeBigNews1-2").html(result[1].Stories.StoryHeading)
$("#time-desh1").html(result[1].Stories.UpdatedDate)
}
if (result[2].Stories.StoryImageThumb !== null && result[2].Stories.StoryImageThumb !== "" && result[2].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews2").attr("href", result[2].Stories.redirectURL)
$("#imghomeBigNews2").attr("src", $("#hdnStoryImage").val() + result[2].Stories.StoryImageThumb)
$("#imghomeBigNews2").prop("alt", result[2].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews2-2").attr("href", result[2].Stories.redirectURL)
$("#urlimghomeBigNews2-2").html(result[2].Stories.StoryHeading)
$("#time-desh2").html(result[2].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews2").attr("href", result[2].Stories.redirectURL)
$("#imghomeBigNews2").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews2").prop("alt", "deshbandhu");
$("#urlimghomeBigNews2-2").attr("href", result[2].Stories.redirectURL)
$("#urlimghomeBigNews2-2").html(result[2].Stories.StoryHeading)
$("#time-desh2").html(result[2].Stories.UpdatedDate)
}
if (result[3].Stories.StoryImageThumb !== null && result[3].Stories.StoryImageThumb !== "" && result[3].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews3").attr("href", result[3].Stories.redirectURL)
$("#imghomeBigNews3").attr("src", $("#hdnStoryImage").val() + result[3].Stories.StoryImageThumb)
$("#imghomeBigNews3").prop("alt", result[3].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews3-2").attr("href", result[3].Stories.redirectURL)
$("#urlimghomeBigNews3-2").html(result[3].Stories.StoryHeading)
$("#time-desh3").html(result[3].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews3").attr("href", result[3].Stories.redirectURL)
$("#imghomeBigNews3").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews3").prop("alt", "deshbandhu");
$("#urlimghomeBigNews3-2").attr("href", result[3].Stories.redirectURL)
$("#urlimghomeBigNews3-2").html(result[3].Stories.StoryHeading)
$("#time-desh3").html(result[3].Stories.UpdatedDate)
}
if (result[4].Stories.StoryImageThumb !== null && result[4].Stories.StoryImageThumb !== "" && result[4].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews4").attr("href", result[4].Stories.redirectURL)
$("#imghomeBigNews4").attr("src", $("#hdnStoryImage").val() + result[4].Stories.StoryImageThumb)
$("#imghomeBigNews4").prop("alt", result[4].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews4-2").attr("href", result[4].Stories.redirectURL)
$("#urlimghomeBigNews4-2").html(result[4].Stories.StoryHeading)
$("#time-desh4").html(result[4].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews4").attr("href", result[4].Stories.redirectURL)
$("#imghomeBigNews4").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews4").prop("alt", "deshbandhu");
$("#urlimghomeBigNews4-2").attr("href", result[4].Stories.redirectURL)
$("#urlimghomeBigNews4-2").html(result[4].Stories.StoryHeading)
$("#time-desh4").html(result[4].Stories.UpdatedDate)
}
if (result[5].Stories.StoryImageThumb !== null && result[5].Stories.StoryImageThumb !== "" && result[5].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews5").attr("href", result[5].Stories.redirectURL)
$("#imghomeBigNews5").attr("src", $("#hdnStoryImage").val() + result[5].Stories.StoryImageThumb)
$("#imghomeBigNews5").prop("alt", result[5].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews5-2").attr("href", result[5].Stories.redirectURL)
$("#urlimghomeBigNews5-2").html(result[5].Stories.StoryHeading)
$("#time-desh5").html(result[5].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews5").attr("href", result[5].Stories.redirectURL)
$("#imghomeBigNews5").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews5").prop("alt", "deshbandhu");
$("#urlimghomeBigNews5-2").attr("href", result[5].Stories.redirectURL)
$("#urlimghomeBigNews5-2").html(result[5].Stories.StoryHeading)
$("#time-desh5").html(result[5].Stories.UpdatedDate)
}
if (result[6].Stories.StoryImageThumb !== null && result[6].Stories.StoryImageThumb !== "" && result[6].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews6").attr("href", result[6].Stories.redirectURL)
$("#imghomeBigNews6").attr("src", $("#hdnStoryImage").val() + result[6].Stories.StoryImageThumb)
$("#imghomeBigNews6").prop("alt", result[6].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews6-2").attr("href", result[6].Stories.redirectURL)
$("#urlimghomeBigNews6-2").html(result[6].Stories.StoryHeading)
$("#time-desh6").html(result[6].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews6").attr("href", result[6].Stories.redirectURL)
$("#imghomeBigNews6").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews6").prop("alt", "deshbandhu");
$("#urlimghomeBigNews6-2").attr("href", result[6].Stories.redirectURL)
$("#urlimghomeBigNews6-2").html(result[6].Stories.StoryHeading)
$("#time-desh6").html(result[6].Stories.UpdatedDate)
}
if (result[7].Stories.StoryImageThumb !== null && result[7].Stories.StoryImageThumb !== "" && result[7].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews7").attr("href", result[7].Stories.redirectURL)
$("#imghomeBigNews7").attr("src", $("#hdnStoryImage").val() + result[7].Stories.StoryImageThumb)
$("#imghomeBigNews7").prop("alt", result[7].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews7-2").attr("href", result[7].Stories.redirectURL)
$("#urlimghomeBigNews7-2").html(result[7].Stories.StoryHeading)
$("#time-desh7").html(result[7].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews7").attr("href", result[7].Stories.redirectURL)
$("#imghomeBigNews7").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews7").prop("alt", "deshbandhu");
$("#urlimghomeBigNews7-2").attr("href", result[7].Stories.redirectURL)
$("#urlimghomeBigNews7-2").html(result[7].Stories.StoryHeading)
$("#time-desh7").html(result[7].Stories.UpdatedDate)
}
if (result[8].Stories.StoryImageThumb !== null && result[8].Stories.StoryImageThumb !== "" && result[8].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews8").attr("href", result[8].Stories.redirectURL)
$("#imghomeBigNews8").attr("src", $("#hdnStoryImage").val() + result[8].Stories.StoryImageThumb)
$("#imghomeBigNews8").prop("alt", result[8].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews8-2").attr("href", result[8].Stories.redirectURL)
$("#urlimghomeBigNews8-2").html(result[8].Stories.StoryHeading)
$("#time-desh8").html(result[8].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews8").attr("href", result[8].Stories.redirectURL)
$("#imghomeBigNews8").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews8").prop("alt", "deshbandhu");
$("#urlimghomeBigNews8-2").attr("href", result[8].Stories.redirectURL)
$("#urlimghomeBigNews8-2").html(result[8].Stories.StoryHeading)
$("#time-desh8").html(result[8].Stories.UpdatedDate)
}
if (result[9].Stories.StoryImageThumb !== null && result[9].Stories.StoryImageThumb !== "" && result[9].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews9").attr("href", result[9].Stories.redirectURL)
$("#imghomeBigNews9").attr("src", $("#hdnStoryImage").val() + result[9].Stories.StoryImageThumb)
$("#imghomeBigNews9").prop("alt", result[9].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews9-2").attr("href", result[9].Stories.redirectURL)
$("#urlimghomeBigNews9-2").html(result[9].Stories.StoryHeading)
$("#time-desh9").html(result[9].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews9").attr("href", result[9].Stories.redirectURL)
$("#imghomeBigNews9").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews9").prop("alt", "deshbandhu");
$("#urlimghomeBigNews9-2").attr("href", result[9].Stories.redirectURL)
$("#urlimghomeBigNews9-2").html(result[9].Stories.StoryHeading)
$("#time-desh9").html(result[9].Stories.UpdatedDate)
}
if (result[10].Stories.StoryImageThumb !== null && result[10].Stories.StoryImageThumb !== "" && result[10].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews10").attr("href", result[10].Stories.redirectURL)
$("#imghomeBigNews10").attr("src", $("#hdnStoryImage").val() + result[10].Stories.StoryImageThumb)
$("#imghomeBigNews10").prop("alt", result[10].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews10-2").attr("href", result[10].Stories.redirectURL)
$("#urlimghomeBigNews10-2").html(result[10].Stories.StoryHeading)
$("#time-desh10").html(result[10].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews10").attr("href", result[10].Stories.redirectURL)
$("#imghomeBigNews10").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews10").prop("alt", "deshbandhu");
$("#urlimghomeBigNews10-2").attr("href", result[10].Stories.redirectURL)
$("#urlimghomeBigNews10-2").html(result[10].Stories.StoryHeading)
$("#time-desh10").html(result[10].Stories.UpdatedDate)
}
if (result[11].Stories.StoryImageThumb !== null && result[11].Stories.StoryImageThumb !== "" && result[11].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews11").attr("href", result[11].Stories.redirectURL)
$("#imghomeBigNews11").attr("src", $("#hdnStoryImage").val() + result[11].Stories.StoryImageThumb)
$("#imghomeBigNews11").prop("alt", result[11].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews11-2").attr("href", result[11].Stories.redirectURL)
$("#urlimghomeBigNews11-2").html(result[11].Stories.StoryHeading)
$("#time-desh11").html(result[11].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews11").attr("href", result[11].Stories.redirectURL)
$("#imghomeBigNews11").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews11").prop("alt", "deshbandhu");
$("#urlimghomeBigNews11-2").attr("href", result[11].Stories.redirectURL)
$("#urlimghomeBigNews11-2").html(result[11].Stories.StoryHeading)
$("#time-desh11").html(result[11].Stories.UpdatedDate)
}
if (result[12].Stories.StoryImageThumb !== null && result[12].Stories.StoryImageThumb !== "" && result[12].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews12").attr("href", result[12].Stories.redirectURL)
$("#imghomeBigNews12").attr("src", $("#hdnStoryImage").val() + result[12].Stories.StoryImageThumb)
$("#imghomeBigNews12").prop("alt", result[12].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews12-2").attr("href", result[12].Stories.redirectURL)
$("#urlimghomeBigNews12-2").html(result[12].Stories.StoryHeading)
$("#time-desh12").html(result[12].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews12").attr("href", result[12].Stories.redirectURL)
$("#imghomeBigNews12").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews12").prop("alt", "deshbandhu");
$("#urlimghomeBigNews12-2").attr("href", result[12].Stories.redirectURL)
$("#urlimghomeBigNews12-2").html(result[12].Stories.StoryHeading)
$("#time-desh12").html(result[12].Stories.UpdatedDate)
}
if (result[13].Stories.StoryImageThumb !== null && result[13].Stories.StoryImageThumb !== "" && result[13].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews13").attr("href", result[13].Stories.redirectURL)
$("#imghomeBigNews13").attr("src", $("#hdnStoryImage").val() + result[13].Stories.StoryImageThumb)
$("#imghomeBigNews13").prop("alt", result[13].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews13-2").attr("href", result[13].Stories.redirectURL)
$("#urlimghomeBigNews13-2").html(result[13].Stories.StoryHeading)
$("#time-desh13").html(result[13].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews13").attr("href", result[13].Stories.redirectURL)
$("#imghomeBigNews13").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews13").prop("alt", "deshbandhu");
$("#urlimghomeBigNews13-2").attr("href", result[13].Stories.redirectURL)
$("#urlimghomeBigNews13-2").html(result[13].Stories.StoryHeading)
$("#time-desh13").html(result[13].Stories.UpdatedDate)
}
if (result[14].Stories.StoryImageThumb !== null && result[14].Stories.StoryImageThumb !== "" && result[14].Stories.StoryImageThumb !== undefined) {
$("#urlhomeBigNews14").attr("href", result[14].Stories.redirectURL)
$("#imghomeBigNews14").attr("src", $("#hdnStoryImage").val() + result[14].Stories.StoryImageThumb)
$("#imghomeBigNews14").prop("alt", result[14].Stories.StoryImageThumb.split("_")[2]);
$("#urlimghomeBigNews14-2").attr("href", result[14].Stories.redirectURL)
$("#urlimghomeBigNews14-2").html(result[14].Stories.StoryHeading)
$("#time-desh14").html(result[14].Stories.UpdatedDate)
}
else {
$("#urlhomeBigNews14").attr("href", result[14].Stories.redirectURL)
$("#imghomeBigNews14").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imghomeBigNews14").prop("alt", "deshbandhu");
$("#urlimghomeBigNews14-2").attr("href", result[14].Stories.redirectURL)
$("#urlimghomeBigNews14-2").html(result[14].Stories.StoryHeading)
$("#time-desh14").html(result[14].Stories.UpdatedDate)
}
$(function () {
$('#divLowerNewsSection img').each(function () {
$(this).attr('src', $(this).attr('data-src'));
});
});
//setTimeout(function () { BindSubCategorybyCat(); }, 500);
//setTimeout(function () {
$('#secPradeshiki').show();
//$("#divLoadImage").hide();
BindSportsNews();
BindManoranjanSectionPictureSlider();
//}, 500);
}
}
else {
setTimeout(function () {
$('#secPradeshiki').show();
BindSportsNews();
BindManoranjanSectionPictureSlider();
}, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
setTimeout(function () {
$('#secPradeshiki').show();
BindSportsNews();
BindManoranjanSectionPictureSlider();
}, 500);
}
});
}
function BindSubCategorybyCat() {
$.ajax({
url: urlSubCategorybyCat,
data: { "categoryId": 2 },
type: 'GET',
dataType: 'json',
crossDomain: true,
// async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
var htmlStates = "";
var htmlLowerStatesHorizontal = "";
var htmlTopStatesHorizontal = "";
if (result !== null && result.length > 0) {
htmlTopStatesHorizontal += '
';
htmlTopStatesHorizontal += '
';
htmlTopStatesHorizontal += '
';
//htmlStates += "
";
for (var i = 0; i < result.length; i++) {
/// htmlStates += '
';
htmlLowerStatesHorizontal += '
';
//htmlLowerStatesHorizontal += '
';
htmlTopStatesHorizontal += '
';
}
htmlTopStatesHorizontal += '
';
htmlTopStatesHorizontal += '
';
htmlTopStatesHorizontal += '
';
htmlTopStatesHorizontal += '
';
htmlTopStatesHorizontal += '
';
htmlTopStatesHorizontal += '
';
htmlTopStatesHorizontal += '
';
// $('#statesData').html(htmlStates);
//$("#divEpaperImages a").attr("href", "/states/" + result[0].englishurl.toString().toLowerCase());
// setTimeout(function () {
$('#secPradeshiki').show();
//BindSportsNews();
//}, 500);
}
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
}
});
}
//Section 5 Functions End
//Section 6 Functions Start
function BindSportsNews() {
//if ($('#ulSportsNews').html().trim() == "") {
$.ajax({
url: urlHomeSubcategorystory,
//data: { "CatID": 1, "scatid": 24, "days": "-" + $("#hdnDays").val() },
data: { "CatID": 1, "scatid": 24, "days": $("#hdnDays").val() },
type: 'GET',
dataType: 'json',
crossDomain: true,
//async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
//var htmlSports = "";
//if (result !== null && result.length > 0) {
// for (var i = 0; i < result.length; i++) {
// htmlSports += '
';
// htmlSports += '';
// if (result[i].storyimage1 !== null && result[i].storyimage1 !== "" && result[i].storyimage1 !== undefined) {
// htmlSports += '
';
// }
// else {
// htmlSports += '
';
// }
// htmlSports += '
';
// htmlSports += '' + result[i].StoryHeading + '
';
// htmlSports += '';
// }
//}
if (result[0].storyimage1 !== null && result[0].storyimage1 !== "" && result[0].storyimage1 !== undefined) {
$("#urlulSportsNews").attr("href", result[0].redirectURL)
$("#imgulSportsNews").attr("src", $("#hdnStoryImage").val() + result[0].storyimage1)
$("#imgulSportsNews").prop("alt", result[0].storyimage1.split("_")[1]);
$("#urlulSportsNews-2").attr("href", result[0].redirectURL)
$("#urlulSportsNews-2").html(result[0].StoryHeading)
}
else {
$("#urlulSportsNews").attr("href", result[0].redirectURL)
$("#imgulSportsNews").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgulSportsNews").prop("alt", "deshbandhu");
$("#urlulSportsNews-2").attr("href", result[0].redirectURL)
$("#urlulSportsNews-2").html(result[0].StoryHeading)
}
if (result[1].storyimage1 !== null && result[1].storyimage1 !== "" && result[1].storyimage1 !== undefined) {
$("#urlulSportsNews1").attr("href", result[1].redirectURL)
$("#imgulSportsNews1").attr("src", $("#hdnStoryImage").val() + result[1].storyimage1)
$("#imgulSportsNews1").prop("alt", result[1].storyimage1.split("_")[1]);
$("#urlulSportsNews1-2").attr("href", result[1].redirectURL)
$("#urlulSportsNews1-2").html(result[1].StoryHeading)
}
else {
$("#urlulSportsNews1").attr("href", result[1].redirectURL)
$("#imgulSportsNews1").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgulSportsNews1").prop("alt", "deshbandhu");
$("#urlulSportsNews1-2").attr("href", result[1].redirectURL)
$("#urlulSportsNews1-2").html(result[1].StoryHeading)
}
if (result[2].storyimage1 !== null && result[2].storyimage1 !== "" && result[2].storyimage1 !== undefined) {
$("#urlulSportsNews2").attr("href", result[2].redirectURL)
$("#imgulSportsNews2").attr("src", $("#hdnStoryImage").val() + result[2].storyimage1)
$("#imgulSportsNews2").prop("alt", result[2].storyimage1.split("_")[1]);
$("#urlulSportsNews2-2").attr("href", result[2].redirectURL)
$("#urlulSportsNews2-2").html(result[2].StoryHeading)
}
else {
$("#urlulSportsNews2").attr("href", result[2].redirectURL)
$("#imgulSportsNews2").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgulSportsNews2").prop("alt", "deshbandhu");
$("#urlulSportsNews2-2").attr("href", result[2].redirectURL)
$("#urlulSportsNews2-2").html(result[2].StoryHeading)
}
if (result[3].storyimage1 !== null && result[3].storyimage1 !== "" && result[3].storyimage1 !== undefined) {
$("#urlulSportsNews3").attr("href", result[3].redirectURL)
$("#imgulSportsNews3").attr("src", $("#hdnStoryImage").val() + result[3].storyimage1)
$("#imgulSportsNews3").prop("alt", result[3].storyimage1.split("_")[1]);
$("#urlulSportsNews3-2").attr("href", result[3].redirectURL)
$("#urlulSportsNews3-2").html(result[3].StoryHeading)
}
else {
$("#urlulSportsNews3").attr("href", result[3].redirectURL)
$("#imgulSportsNews3").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgulSportsNews3").prop("alt", "deshbandhu");
$("#urlulSportsNews3-2").attr("href", result[3].redirectURL)
$("#urlulSportsNews3-2").html(result[3].StoryHeading)
}
if (result[4].storyimage1 !== null && result[4].storyimage1 !== "" && result[4].storyimage1 !== undefined) {
$("#urlulSportsNews4").attr("href", result[4].redirectURL)
$("#imgulSportsNews4").attr("src", $("#hdnStoryImage").val() + result[4].storyimage1)
$("#imgulSportsNews4").prop("alt", result[4].storyimage1.split("_")[1]);
$("#urlulSportsNews4-2").attr("href", result[4].redirectURL)
$("#urlulSportsNews4-2").html(result[4].StoryHeading)
}
else {
$("#urlulSportsNews4").attr("href", result[4].redirectURL)
$("#imgulSportsNews4").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgulSportsNews4").prop("alt", "deshbandhu");
$("#urlulSportsNews4-2").attr("href", result[4].redirectURL)
$("#urlulSportsNews4-2").html(result[4].StoryHeading)
}
if (result[5].storyimage1 !== null && result[5].storyimage1 !== "" && result[5].storyimage1 !== undefined) {
$("#urlulSportsNews5").attr("href", result[5].redirectURL)
$("#imgulSportsNews5").attr("src", $("#hdnStoryImage").val() + result[5].storyimage1)
$("#imgulSportsNews5").prop("alt", result[5].storyimage1.split("_")[1]);
$("#urlulSportsNews5-2").attr("href", result[5].redirectURL)
$("#urlulSportsNews5-2").html(result[5].StoryHeading)
}
else {
$("#urlulSportsNews5").attr("href", result[5].redirectURL)
$("#imgulSportsNews5").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgulSportsNews5").prop("alt", "deshbandhu");
$("#urlulSportsNews5-2").attr("href", result[5].redirectURL)
$("#urlulSportsNews5-2").html(result[5].StoryHeading)
}
if (result[6].storyimage1 !== null && result[6].storyimage1 !== "" && result[6].storyimage1 !== undefined) {
$("#urlulSportsNews6").attr("href", result[6].redirectURL)
$("#imgulSportsNews6").attr("src", $("#hdnStoryImage").val() + result[6].storyimage1)
$("#imgulSportsNews6").prop("alt", result[6].storyimage1.split("_")[1]);
$("#urlulSportsNews6-2").attr("href", result[6].redirectURL)
$("#urlulSportsNews6-2").html(result[6].StoryHeading)
}
else {
$("#urlulSportsNews6").attr("href", result[6].redirectURL)
$("#imgulSportsNews6").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgulSportsNews6").prop("alt", "deshbandhu");
$("#urlulSportsNews6-2").attr("href", result[6].redirectURL)
$("#urlulSportsNews6-2").html(result[6].StoryHeading)
}
if (result[7].storyimage1 !== null && result[7].storyimage1 !== "" && result[7].storyimage1 !== undefined) {
$("#urlulSportsNews7").attr("href", result[7].redirectURL)
$("#imgulSportsNews7").attr("src", $("#hdnStoryImage").val() + result[7].storyimage1)
$("#imgulSportsNews7").prop("alt", result[7].storyimage1.split("_")[1]);
$("#urlulSportsNews7-2").attr("href", result[7].redirectURL)
$("#urlulSportsNews7-2").html(result[7].StoryHeading)
}
else {
$("#urlulSportsNews7").attr("href", result[7].redirectURL)
$("#imgulSportsNews7").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgulSportsNews7").prop("alt", "deshbandhu");
$("#urlulSportsNews7-2").attr("href", result[7].redirectURL)
$("#urlulSportsNews7-2").html(result[7].StoryHeading)
}
if (result[8].storyimage1 !== null && result[8].storyimage1 !== "" && result[8].storyimage1 !== undefined) {
$("#urlulSportsNews8").attr("href", result[8].redirectURL)
$("#imgulSportsNews8").attr("src", $("#hdnStoryImage").val() + result[8].storyimage1)
$("#imgulSportsNews8").prop("alt", result[8].storyimage1.split("_")[1]);
$("#urlulSportsNews8-2").attr("href", result[8].redirectURL)
$("#urlulSportsNews8-2").html(result[8].StoryHeading)
}
else {
$("#urlulSportsNews8").attr("href", result[8].redirectURL)
$("#imgulSportsNews8").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgulSportsNews8").prop("alt", "deshbandhu");
$("#urlulSportsNews8-2").attr("href", result[8].redirectURL)
$("#urlulSportsNews8-2").html(result[8].StoryHeading)
}
//$('#ulSportsNews').html(htmlSports);
$(function () {
$('#ulSportsNews img').each(function () {
$(this).attr('src', $(this).attr('data-src'));
});
});
setTimeout(function () {
$('#secSports').show();
// Bind_Live_Score_Team();
}, 500);
}
else {
setTimeout(function () {
$('#secSports').show();
// Bind_Live_Score_Team();
}, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
setTimeout(function () {
$('#secSports').show();
//Bind_Live_Score_Team();
}, 500);
}
});
}
//function Bind_Live_Score_Team() {
// $.ajax({
// url: "http://cricapi.com/api/matches",
// data: { "apikey": 'sHDJo6tIZxSAqRYYHaY9U5UBYf23' },
// type: 'GET',
// dataType: 'json',
// crossDomain: true,
// // async: false,
// success: function (data, textStatus, xhr) {
// if (data !== "") {
// var TeamList = "";
// var TeamCount = 0;
// for (var i = 0; i < data.matches.length; i++) {
// if (TeamCount < 3) {
// //&& (data.matches[i].type.trim().toString().toLocaleLowerCase() == "odi" || data.matches[i].type.trim().toString().toLocaleLowerCase() == "t20i" || data.matches[i].type.trim().toString().toLocaleLowerCase() == "womenst20i" || data.matches[i].type.trim().toString().toLocaleLowerCase() == "test")
// if (data.matches[i].matchStarted.toString().toLocaleLowerCase() === "true") {
// TeamList += "," + data.matches[i].unique_id;
// TeamCount++;
// }
// }
// }
// setTimeout(function () { Bind_Live_Score_Data(TeamList.substring(1)); }, 500);
// }
// else {
// setTimeout(function () { Bind_Live_Score_Data(TeamList.substring(1)); }, 500);
// }
// },
// error: function (xhr, textStatus, errorThrown) {
// console.log(errorThrown);
// setTimeout(function () { Bind_Live_Score_Data(TeamList.substring(1)); }, 500);
// }
// });
// setTimeout(function () {
// $("#divLoadImage").hide();
// $("#divLoadMore").show();
// }, 500);
// //setTimeout(function () {
// // $('#secSports').show();
// // Bind_HomePage_Entertainment_Gallery();
// //}, 3000);
//}
//var ScoreBinded = false;
//function Bind_Live_Score_Data(TeamList) {
// if (ScoreBinded === false) {
// var TeamListArray = TeamList.split(',');
// var htmlLiveScrore = "";
// for (var i = 0; i < TeamListArray.length; i++) {
// $.ajax({
// url: "http://cricapi.com/api/cricketScore",
// data: { "unique_id": TeamListArray[i], "apikey": 'sHDJo6tIZxSAqRYYHaY9U5UBYf23' },
// type: 'GET',
// dataType: 'json',
// crossDomain: true,
// async: false,
// success: function (data, textStatus, xhr) {
// if (data !== "") {
// htmlLiveScrore += '
MATCH ' + (i + 1).toString() + ': ' + data["team-1"] + ' Vs ' + data["team-2"] + '
';
// htmlLiveScrore += '
';
// htmlLiveScrore += '';
// htmlLiveScrore += '
';
// htmlLiveScrore += '
' + dataescription + '
';
// htmlLiveScrore += '
';
// htmlLiveScrore += '
';
// htmlLiveScrore += '';
// }
// else {
// setTimeout(function () {
// $('#secSports').show();
// $("#divLoadImage").hide();
// $("#divLoadMore").show();
// }, 500);
// }
// },
// error: function (xhr, textStatus, errorThrown) {
// console.log(errorThrown);
// //setTimeout(function () {
// // $('#secSports').show();
// // Bind_HomePage_Entertainment_Gallery();
// //}, 750);
// setTimeout(function () {
// $('#secSports').show();
// $("#divLoadImage").hide();
// $("#divLoadMore").show();
// }, 500);
// }
// });
// }
// $("#divLiveScore").html(htmlLiveScrore);
// ScoreBinded = true;
// }
//}
//Section 6 Functions End
//Section 7 Functions Start
function BindManoranjanSectionPictureSlider() {
$("#divLoadImage").show();
$.ajax({
url: urlstoryByCatID,
//data: { "CatID": 7, "Home": 'Y', "days": "-" + $("#hdnDays").val() },
data: { "CatID": 7, "Home": 'Y', "days": $("#hdnDays").val() },
//data: { "CatName": "miscllenious" },
type: 'GET',
dataType: 'json',
crossDomain: true,
async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
//alert(result.length);
//return false;
var htmlManoranjanImageSlider = "";
if (result !== null && result.length > 0) {
htmlManoranjanImageSlider += '
';
htmlManoranjanImageSlider += '
';
if (result[0].StoryImage1 !== null && result[0].StoryImage1 !== "" && result[0].StoryImage1 !== undefined) {
htmlManoranjanImageSlider += '
';
}
else {
htmlManoranjanImageSlider += '
';
}
htmlManoranjanImageSlider += '
'
if (result[1].StoryImage1 !== null && result[1].StoryImage1 !== "" && result[1].StoryImage1 !== undefined) {
htmlManoranjanImageSlider += '
';
}
else {
htmlManoranjanImageSlider += '
';
}
htmlManoranjanImageSlider += '
';
if (result[2].StoryImage1 !== null && result[2].StoryImage1 !== "" && result[2].StoryImage1 !== undefined) {
htmlManoranjanImageSlider += '
';
}
else {
htmlManoranjanImageSlider += '
';
}
htmlManoranjanImageSlider += '
';
if (result[3].StoryImage1 !== null && result[3].StoryImage1 !== "" && result[3].StoryImage1 !== undefined) {
htmlManoranjanImageSlider += '
';
}
else {
htmlManoranjanImageSlider += '
';
}
htmlManoranjanImageSlider += '
';
if (result[4].StoryImage1 !== null && result[4].StoryImage1 !== "" && result[4].StoryImage1 !== undefined) {
htmlManoranjanImageSlider += '
';
}
else {
htmlManoranjanImageSlider += '
';
}
htmlManoranjanImageSlider += '
';
htmlManoranjanImageSlider += '
';
htmlManoranjanImageSlider += '
';
htmlManoranjanImageSlider += '
';
htmlManoranjanImageSlider += '
';
}
$('#divManoranjanImageSlider').html(htmlManoranjanImageSlider);
$(function () {
$('#divManoranjanImageSlider img').each(function () {
$(this).attr('src', $(this).attr('data-src'));
});
});
$("#divLoadImage").hide();
Bind_HomePage_Entertainment_Gallery();
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
Bind_HomePage_Entertainment_Gallery();
}
});
}
function Bind_HomePage_Entertainment_Gallery() {
//$("#divLoadImage").show();
$.ajax({
url: urlMultiCatDataEntertainment,
//data: { "CatID": 1, "scatid": 20, "days": "-" + $("#hdnDays").val() },
data: { "CatName": "entertanment" },
type: 'GET',
dataType: 'json',
crossDomain: true,
//async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
//var EntStoryList = "";
//var EntItemCount = 0;
var result = jQuery.parseJSON(data);
//var chkImgCategory_name = "";
if (result !== null && result.length > 0) {
//var htmlGalleryImages = "";
//for (var i = 0; i < result.length; i++) {
// if (EntItemCount < 12) {
// EntItemCount++;
// if (EntStoryList.indexOf(result[i].Stories.storyid) > -1) {
// EntStoryList += "," + result[i].Stories.storyid.toString();
// }
// else {
// htmlGalleryImages += '
';
// }
// }
//}
if (result[0].Stories.StoryImageThumb !== null && result[0].Stories.StoryImageThumb !== undefined && result[0].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage").attr("href", result[0].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[0].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage").prop("alt", result[0].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title').text(result[0].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage").attr("href", result[0].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage").prop("alt", "deshbandhu");
$('div#gallery-title').text(result[0].Stories.StoryHeading)
}
if (result[1].Stories.StoryImageThumb !== null && result[1].Stories.StoryImageThumb !== undefined && result[1].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage1").attr("href", result[1].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage1").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[1].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage1").prop("alt", result[1].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title1').text(result[1].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage1").attr("href", result[1].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage1").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage1").prop("alt", "deshbandhu");
$('div#gallery-title1').text(result[1].Stories.StoryHeading)
}
if (result[2].Stories.StoryImageThumb !== null && result[2].Stories.StoryImageThumb !== undefined && result[2].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage2").attr("href", result[2].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage2").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[2].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage2").prop("alt", result[2].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title2').text(result[2].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage2").attr("href", result[2].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage2").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage2").prop("alt", "deshbandhu");
$('div#gallery-title2').text(result[2].Stories.StoryHeading)
}
if (result[3].Stories.StoryImageThumb !== null && result[3].Stories.StoryImageThumb !== undefined && result[3].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage3").attr("href", result[3].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage3").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[3].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage3").prop("alt", result[3].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title3').text(result[3].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage3").attr("href", result[3].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage3").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage3").prop("alt", "deshbandhu");
$('div#gallery-title3').text(result[3].Stories.StoryHeading)
}
if (result[4].Stories.StoryImageThumb !== null && result[4].Stories.StoryImageThumb !== undefined && result[4].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage4").attr("href", result[4].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage4").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[4].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage4").prop("alt", result[4].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title4').text(result[4].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage4").attr("href", result[4].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage4").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage4").prop("alt", "deshbandhu");
$('div#gallery-title4').text(result[4].Stories.StoryHeading)
}
if (result[5].Stories.StoryImageThumb !== null && result[5].Stories.StoryImageThumb !== undefined && result[5].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage5").attr("href", result[5].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage5").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[5].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage5").prop("alt", result[5].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title5').text(result[5].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage5").attr("href", result[5].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage5").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage4").prop("alt", "deshbandhu");
$('div#gallery-title5').text(result[5].Stories.StoryHeading)
}
if (result[6].Stories.StoryImageThumb !== null && result[6].Stories.StoryImageThumb !== undefined && result[6].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage6").attr("href", result[6].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage6").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[6].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage6").prop("alt", result[6].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title6').text(result[6].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage6").attr("href", result[6].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage6").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage6").prop("alt", "deshbandhu");
$('div#gallery-title6').text(result[6].Stories.StoryHeading)
}
if (result[7].Stories.StoryImageThumb !== null && result[7].Stories.StoryImageThumb !== undefined && result[7].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage7").attr("href", result[7].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage7").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[7].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage7").prop("alt", result[7].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title7').text(result[7].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage7").attr("href", result[7].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage7").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage7").prop("alt", "deshbandhu");
$('div#gallery-title7').text(result[7].Stories.StoryHeading)
}
if (result[8].Stories.StoryImageThumb !== null && result[8].Stories.StoryImageThumb !== undefined && result[8].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage8").attr("href", result[8].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage8").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[8].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage8").prop("alt", result[8].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title8').text(result[8].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage8").attr("href", result[8].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage8").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage8").prop("alt", "deshbandhu");
$('div#gallery-title8').text(result[8].Stories.StoryHeading)
}
if (result[9].Stories.StoryImageThumb !== null && result[9].Stories.StoryImageThumb !== undefined && result[9].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage9").attr("href", result[9].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage9").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[9].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage9").prop("alt", result[9].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title9').text(result[9].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage9").attr("href", result[9].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage9").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage9").prop("alt", "deshbandhu");
$('div#gallery-title9').text(result[9].Stories.StoryHeading)
}
if (result[10].Stories.StoryImageThumb !== null && result[10].Stories.StoryImageThumb !== undefined && result[10].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage10").attr("href", result[10].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage10").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[10].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage10").prop("alt", result[10].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title10').text(result[10].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage10").attr("href", result[10].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage10").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage10").prop("alt", "deshbandhu");
$('div#gallery-title10').text(result[10].Stories.StoryHeading)
}
if (result[11].Stories.StoryImageThumb !== null && result[11].Stories.StoryImageThumb !== undefined && result[11].Stories.StoryImageThumb !== "") {
$("#urldivGalleryImageHomepage11").attr("href", result[11].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage11").attr("src", $("#hdnsitemappath").val() + "admin/storyimage\\" + result[11].Stories.StoryImageThumb)
$("#imgurldivGalleryImageHomepage11").prop("alt", result[11].Stories.StoryImageThumb.split("_")[2]);
$('div#gallery-title11').text(result[11].Stories.StoryHeading)
}
else {
$("#urldivGalleryImageHomepage11").attr("href", result[11].Stories.redirectURL)
$("#imgurldivGalleryImageHomepage11").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgurldivGalleryImageHomepage11").prop("alt", "deshbandhu");
$('div#gallery-title11').text(result[11].Stories.StoryHeading)
}
//$("#divGalleryImageHomepage").html(htmlGalleryImages);
setTimeout(function () {
$('#divGalleryImageHomepage img').each(function () {
$(this).attr('src', $(this).attr('data-src'));
});
}, 100);
//$("#divLoadImage").hide();
// setTimeout(function () {
//$("#divEntSlider").show();
// BindHomePoliticalstory();
// }, 500);
$("#divEntSlider").show();
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindHomePoliticalstory();
}, 500);
}
else {
$("#divEntSlider").show();
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindHomePoliticalstory();
}, 500);
}
}
else {
$("#divEntSlider").show();
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindHomePoliticalstory();
}, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
$("#divEntSlider").show();
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindHomePoliticalstory();
}, 500);
}
});
}
//Section 7 Functions End
//Section 8 Functions Start
function BindHomePoliticalstory() {
//$("#divLoadImage").show();
//if ($('#PoliticalNews').html().trim() == "") {
$.ajax({
url: urlHomeSubcategorystory,
//data: { "CatID": 1, "scatid": 25, "days": "-" + $("#hdnDays").val() },
data: { "CatID": 1, "scatid": 25, "days": $("#hdnDays").val() },
type: 'GET',
dataType: 'json',
crossDomain: true,
//async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
//var htmlPolitical = "";
//if (result !== null && result.length > 0) {
//htmlPolitical += '
';
//var MaxData = 6;
//if (result.length < MaxData)
// MaxData = result.length;
//for (var i = 0; i < MaxData; i++) {
// htmlPolitical += '
';
// htmlPolitical += '
';
// if (result[i].storyimage1 !== null && result[i].storyimage1 !== "" && result[i].storyimage1 !== undefined) {
// htmlPolitical += '
';
// }
// else {
// htmlPolitical += '
';
// }
// htmlPolitical += '
';
// htmlPolitical += '
';
// //htmlPolitical += '
' + result[i].UpdatedDate + '
';
// htmlPolitical += '
' + result[i].storydate + '
';
// htmlPolitical += '
';
// htmlPolitical += '
';
// htmlPolitical += '
';
//}
//}
//$('#PoliticalNews').html(htmlPolitical);
if (result[0].storyimage1 !== null && result[0].storyimage1 !== "" && result[0].storyimage1 !== undefined) {
$("#urlPoliticalNews").attr("href", result[0].redirectURL)
$("#imgPoliticalNews").attr("src", $("#hdnStoryImage").val() + result[0].storyimage1)
$("#imgPoliticalNews").prop("alt", result[0].storyimage1.split("_")[1]);
$("#urlPoliticalNews-2").attr("href", result[0].redirectURL)
$("#urlPoliticalNews-2").html(result[0].StoryHeading)
$("#dbanchu-time").html(result[0].storydate)
}
else {
$("#urlPoliticalNews").attr("href", result[0].redirectURL)
$("#imgPoliticalNews").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgPoliticalNews").prop("alt","deshbandhu");
$("#urlPoliticalNews-2").attr("href", result[0].redirectURL)
$("#urlPoliticalNews-2").html(result[0].StoryHeading)
$("#dbanchu-time").html(result[0].storydate)
}
if (result[1].storyimage1 !== null && result[1].storyimage1 !== "" && result[1].storyimage1 !== undefined) {
$("#urlPoliticalNews1").attr("href", result[1].redirectURL)
$("#imgPoliticalNews1").attr("src", $("#hdnStoryImage").val() + result[1].storyimage1)
$("#imgPoliticalNews1").prop("alt", result[1].storyimage1.split("_")[1]);
$("#urlPoliticalNews1-2").attr("href", result[1].redirectURL)
$("#urlPoliticalNews1-2").html(result[1].StoryHeading)
$("#dbanchu-time1").html(result[1].storydate)
}
else {
$("#urlPoliticalNews1").attr("href", result[1].redirectURL)
$("#imgPoliticalNews1").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgPoliticalNews1").prop("alt", "deshbandhu");
$("#urlPoliticalNews1-2").attr("href", result[1].redirectURL)
$("#urlPoliticalNews1-2").html(result[1].StoryHeading)
$("#dbanchu-time1").html(result[1].storydate)
}
if (result[2].storyimage1 !== null && result[2].storyimage1 !== "" && result[2].storyimage1 !== undefined) {
$("#urlPoliticalNews2").attr("href", result[2].redirectURL)
$("#imgPoliticalNews2").attr("src", $("#hdnStoryImage").val() + result[2].storyimage1)
$("#imgPoliticalNews2").prop("alt", result[2].storyimage1.split("_")[1]);
$("#urlPoliticalNews2-2").attr("href", result[2].redirectURL)
$("#urlPoliticalNews2-2").html(result[2].StoryHeading)
$("#dbanchu-time2").html(result[2].storydate)
}
else {
$("#urlPoliticalNews2").attr("href", result[2].redirectURL)
$("#imgPoliticalNews2").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgPoliticalNews2").prop("alt", "deshbandhu");
$("#urlPoliticalNews2-2").attr("href", result[2].redirectURL)
$("#urlPoliticalNews2-2").html(result[2].StoryHeading)
$("#dbanchu-time2").html(result[2].storydate)
}
if (result[3].storyimage1 !== null && result[3].storyimage1 !== "" && result[3].storyimage1 !== undefined) {
$("#urlPoliticalNews3").attr("href", result[3].redirectURL)
$("#imgPoliticalNews3").attr("src", $("#hdnStoryImage").val() + result[3].storyimage1)
$("#imgPoliticalNews3").prop("alt", result[3].storyimage1.split("_")[1]);
$("#urlPoliticalNews3-2").attr("href", result[3].redirectURL)
$("#urlPoliticalNews3-2").html(result[3].StoryHeading)
$("#dbanchu-time3").html(result[3].storydate)
}
else {
$("#urlPoliticalNews3").attr("href", result[3].redirectURL)
$("#imgPoliticalNews3").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgPoliticalNews3").prop("alt", "deshbandhu");
$("#urlPoliticalNews3-2").attr("href", result[3].redirectURL)
$("#urlPoliticalNews3-2").html(result[3].StoryHeading)
$("#dbanchu-time3").html(result[3].storydate)
}
if (result[4].storyimage1 !== null && result[4].storyimage1 !== "" && result[4].storyimage1 !== undefined) {
$("#urlPoliticalNews4").attr("href", result[4].redirectURL)
$("#imgPoliticalNews4").attr("src", $("#hdnStoryImage").val() + result[4].storyimage1)
$("#imgPoliticalNews4").prop("alt", result[4].storyimage1.split("_")[1]);
$("#urlPoliticalNews4-2").attr("href", result[4].redirectURL)
$("#urlPoliticalNews4-2").html(result[4].StoryHeading)
$("#dbanchu-time4").html(result[4].storydate)
}
else {
$("#urlPoliticalNews4").attr("href", result[4].redirectURL)
$("#imgPoliticalNews4").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgPoliticalNews4").prop("alt", "deshbandhu");
$("#urlPoliticalNews4-2").attr("href", result[4].redirectURL)
$("#urlPoliticalNews4-2").html(result[4].StoryHeading)
$("#dbanchu-time4").html(result[4].storydate)
}
if (result[5].storyimage1 !== null && result[5].storyimage1 !== "" && result[5].storyimage1 !== undefined) {
$("#urlPoliticalNews5").attr("href", result[5].redirectURL)
$("#imgPoliticalNews5").attr("src", $("#hdnStoryImage").val() + result[5].storyimage1)
$("#imgPoliticalNews5").prop("alt", result[5].storyimage1.split("_")[1]);
$("#urlPoliticalNews5-2").attr("href", result[5].redirectURL)
$("#urlPoliticalNews5-2").html(result[5].StoryHeading)
$("#dbanchu-time5").html(result[5].storydate)
}
else {
$("#urlPoliticalNews5").attr("href", result[5].redirectURL)
$("#imgPoliticalNews5").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgPoliticalNews5").prop("alt", "deshbandhu");
$("#urlPoliticalNews5-2").attr("href", result[5].redirectURL)
$("#urlPoliticalNews5-2").html(result[5].StoryHeading)
$("#dbanchu-time5").html(result[5].storydate)
}
$(function () {
$('#PoliticalNews img').each(function () {
$(this).attr('src', $(this).attr('data-src'));
});
});
$("#divLoadImage").hide();
setTimeout(function () { BindYouth(); }, 500);
}
else {
setTimeout(function () { BindYouth(); }, 500);
}
$("#divLoadImage").hide();
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
setTimeout(function () { BindYouth(); }, 500);
}
});
}
function BindYouth() {
$("#divLoadImage").show();
if ($('#divYouth').html().trim() == "") {
$.ajax({
url: urlMultiCatData,
data: { "CatName": "youth", "days": 7 },
type: 'GET',
dataType: 'json',
crossDomain: true,
//async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
var htmlYouth = "";
if (result !== null && result.length > 0) {
for (var i = 0; i < result.length; i++) {
if (i == 0) {
htmlYouth += '
';
}
else {
htmlYouth += '
';
}
htmlYouth += '
';
if (result[i].Stories.StoryImageThumb !== null && result[i].Stories.StoryImageThumb !== "" && result[i].Stories.StoryImageThumb !== undefined) {
htmlYouth += '
';
}
else {
htmlYouth += '
';
}
htmlYouth += '
';
htmlYouth += '
';
htmlYouth += '
';
}
$('#divYouth').html(htmlYouth);
$(function () {
$('#divYouth img').each(function () {
$(this).attr('src', $(this).attr('data-src'));
});
});
$("#divLoadImage").hide();
setTimeout(function () { BindHomeSubcategorytoryforVimersh(); }, 500);
}
else {
setTimeout(function () { BindHomeSubcategorytoryforVimersh(); }, 500);
}
}
else {
setTimeout(function () { BindHomeSubcategorytoryforVimersh(); }, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
setTimeout(function () { BindHomeSubcategorytoryforVimersh(); }, 500);
}
});
}
}
function BindHomeSubcategorytoryforVimersh() {
$("#divLoadImage").show();
if ($('#divVisheshNews2').html().trim() == "") {
$.ajax({
url: urlHomeSubcategorystory,
//data: { "CatID": 1, "scatid": 20, "days": "-" + $("#hdnDays").val() },
data: { "CatID": 1, "scatid": 20, "days": $("#hdnDays").val() },
type: 'GET',
dataType: 'json',
crossDomain: true,
// async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
//var htmlVishesh = "";
var htmlVishesh2 = "";
if (result !== null && result.length > 0) {
for (var i = 0; i < result.length; i++) {
if (i == 0) {
htmlVishesh2 += '
';
}
else {
htmlVishesh2 += '
';
}
htmlVishesh2 += '
';
if (result[i].StoryImageThumb !== null && result[i].StoryImageThumb !== "" && result[i].StoryImageThumb !== undefined) {
htmlVishesh2 += '
';
}
else {
htmlVishesh2 += '
';
}
htmlVishesh2 += '
';
htmlVishesh2 += '
';
htmlVishesh2 += '
';
}
}
//$('#StoryForVishesh').html(htmlVishesh);
$('#divVisheshNews2').html(htmlVishesh2);
$(function () {
$('#divVisheshNews2 img').each(function () {
$(this).attr('src', $(this).attr('data-src'));
});
});
$("#divLoadImage").hide();
//setTimeout(function () {
$('#SecBusiness').show();
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindVividhSectionNews();
}, 500);
// }, 500);
}
else {
$('#SecBusiness').show();
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindVividhSectionNews();
}, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
$('#SecBusiness').show();
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindVividhSectionNews();
}, 500);
}
});
}
}
//Section 8 Functions End
//Section 9 Functions Start
function BindVividhSectionNews() {
//$("#divLoadImage").show();
//if ($('#divVividhData1').html().trim() == "" || $('#divVividhData2').html().trim() == "") {
$.ajax({
url: urlMultiCatData,
data: { "CatName": "miscllenious", "days": 7 },
type: 'GET',
dataType: 'json',
crossDomain: true,
// async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
//var htmlEntertainmentActive = "";
//var htmlEntertainmentInActive = "";
if (result !== null && result.length > 0) {
//var ItemCount = 0;
//startactive1:
//for (var i = 0; i < result.length; i++) {
// if (i < 4) {
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// if (result[i].Stories.StoryImageThumb !== null && result[i].Stories.StoryImageThumb !== "" && result[i].Stories.StoryImageThumb !== undefined) {
// htmlEntertainmentActive += '
';
// }
// else {
// htmlEntertainmentActive += '
';
// }
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '' + result[i].Stories.UpdatedDate + '';
// htmlEntertainmentActive += '';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// //htmlEntertainmentActive += '
';
// //htmlEntertainmentActive += '
';
// //htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// htmlEntertainmentActive += '
';
// }
// else {
// if (i < 8) {
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// if (result[i].Stories.StoryImageThumb !== null && result[i].Stories.StoryImageThumb !== "" && result[i].Stories.StoryImageThumb !== undefined) {
// htmlEntertainmentInActive += '
';
// }
// else {
// htmlEntertainmentInActive += '
';
// }
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '' + result[i].Stories.UpdatedDate + '';
// htmlEntertainmentInActive += '';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// //htmlEntertainmentInActive += '
';
// //htmlEntertainmentInActive += '
';
// //htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// htmlEntertainmentInActive += '
';
// }
// }
//}
//htmlEntertainment += '
';
//htmlEntertainment += '
';
if (result[0].Stories.StoryImageThumb !== null && result[0].Stories.StoryImageThumb !== "" && result[0].Stories.StoryImageThumb !== undefined) {
$("#urldivVividhData1").attr("href", result[0].Stories.redirectURL)
$("#imgdivVividhData1").attr("src", $("#hdnStoryImage").val() + result[0].Stories.StoryImageThumb)
$("#imgdivVividhData1").prop("alt", result[0].Stories.StoryImageThumb.split("_")[2]);
$("#urldivVividhData1-2").attr("href", result[0].Stories.redirectURL)
$("#urldivVividhData1-2").html(result[0].Stories.StoryHeading)
$("#dbtime").html(result[0].Stories.UpdatedDate)
}
else {
$("#urldivVividhData1").attr("href", result[0].Stories.redirectURL)
$("#imgdivVividhData1").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgdivVividhData1").prop("alt", "deshbandhu");
$("#urldivVividhData1-2").attr("href", result[0].Stories.redirectURL)
$("#urldivVividhData1-2").html(result[0].Stories.StoryHeading)
$("#dbtime").html(result[0].Stories.UpdatedDate)
}
if (result[1].Stories.StoryImageThumb !== null && result[1].Stories.StoryImageThumb !== "" && result[1].Stories.StoryImageThumb !== undefined) {
$("#urldivVividhData11").attr("href", result[1].Stories.redirectURL)
$("#imgdivVividhData11").attr("src", $("#hdnStoryImage").val() + result[1].Stories.StoryImageThumb)
$("#imgdivVividhData11").prop("alt", result[1].Stories.StoryImageThumb.split("_")[2]);
$("#urldivVividhData11-2").attr("href", result[1].Stories.redirectURL)
$("#urldivVividhData11-2").html(result[1].Stories.StoryHeading)
$("#dbtime1").html(result[1].Stories.UpdatedDate)
}
else {
$("#urldivVividhData11").attr("href", result[1].Stories.redirectURL)
$("#imgdivVividhData11").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgdivVividhData11").prop("alt", "deshbandhu");
$("#urldivVividhData11-2").attr("href", result[1].Stories.redirectURL)
$("#urldivVividhData11-2").html(result[1].Stories.StoryHeading)
$("#dbtime1").html(result[1].Stories.UpdatedDate)
}
if (result[2].Stories.StoryImageThumb !== null && result[2].Stories.StoryImageThumb !== "" && result[2].Stories.StoryImageThumb !== undefined) {
$("#urldivVividhData12").attr("href", result[2].Stories.redirectURL)
$("#imgdivVividhData12").attr("src", $("#hdnStoryImage").val() + result[2].Stories.StoryImageThumb)
$("#imgdivVividhData12").prop("alt", result[2].Stories.StoryImageThumb.split("_")[2]);
$("#urldivVividhData12-2").attr("href", result[2].Stories.redirectURL)
$("#urldivVividhData12-2").html(result[2].Stories.StoryHeading)
$("#dbtime2").html(result[2].Stories.UpdatedDate)
}
else {
$("#urldivVividhData12").attr("href", result[2].Stories.redirectURL)
$("#imgdivVividhData12").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgdivVividhData12").prop("alt", "deshbandhu");
$("#urldivVividhData12-2").attr("href", result[2].Stories.redirectURL)
$("#urldivVividhData12-2").html(result[2].Stories.StoryHeading)
$("#dbtime2").html(result[2].Stories.UpdatedDate)
}
if (result[3].Stories.StoryImageThumb !== null && result[3].Stories.StoryImageThumb !== "" && result[3].Stories.StoryImageThumb !== undefined) {
$("#urldivVividhData13").attr("href", result[3].Stories.redirectURL)
$("#imgdivVividhData13").attr("src", $("#hdnStoryImage").val() + result[3].Stories.StoryImageThumb)
$("#imgdivVividhData13").prop("alt", result[3].Stories.StoryImageThumb.split("_")[2]);
$("#urldivVividhData13-2").attr("href", result[3].Stories.redirectURL)
$("#urldivVividhData13-2").html(result[3].Stories.StoryHeading)
$("#dbtime3").html(result[3].Stories.UpdatedDate)
}
else {
$("#urldivVividhData13").attr("href", result[3].Stories.redirectURL)
$("#imgdivVividhData13").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgdivVividhData13").prop("alt", "deshbandhu");
$("#urldivVividhData13-2").attr("href", result[3].Stories.redirectURL)
$("#urldivVividhData13-2").html(result[3].Stories.StoryHeading)
$("#dbtime3").html(result[3].Stories.UpdatedDate)
}
if (result[4].Stories.StoryImageThumb !== null && result[4].Stories.StoryImageThumb !== "" && result[4].Stories.StoryImageThumb !== undefined) {
$("#urldivVividhData14").attr("href", result[4].Stories.redirectURL)
$("#imgdivVividhData14").attr("src", $("#hdnStoryImage").val() + result[4].Stories.StoryImageThumb)
$("#imgdivVividhData14").prop("alt", result[4].Stories.StoryImageThumb.split("_")[2]);
$("#urldivVividhData14-2").attr("href", result[4].Stories.redirectURL)
$("#urldivVividhData14-2").html(result[4].Stories.StoryHeading)
$("#dbtime4").html(result[4].Stories.UpdatedDate)
}
else {
$("#urldivVividhData14").attr("href", result[4].Stories.redirectURL)
$("#imgdivVividhData14").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgdivVividhData14").prop("alt", "deshbandhu");
$("#urldivVividhData14-2").attr("href", result[4].Stories.redirectURL)
$("#urldivVividhData14-2").html(result[4].Stories.StoryHeading)
$("#dbtime4").html(result[4].Stories.UpdatedDate)
}
if (result[5].Stories.StoryImageThumb !== null && result[5].Stories.StoryImageThumb !== "" && result[5].Stories.StoryImageThumb !== undefined) {
$("#urldivVividhData15").attr("href", result[5].Stories.redirectURL)
$("#imgdivVividhData15").attr("src", $("#hdnStoryImage").val() + result[5].Stories.StoryImageThumb)
$("#imgdivVividhData15").prop("alt", result[5].Stories.StoryImageThumb.split("_")[2]);
$("#urldivVividhData15-2").attr("href", result[5].Stories.redirectURL)
$("#urldivVividhData15-2").html(result[5].Stories.StoryHeading)
$("#dbtime5").html(result[5].Stories.UpdatedDate)
}
else {
$("#urldivVividhData15").attr("href", result[5].Stories.redirectURL)
$("#imgdivVividhData15").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgdivVividhData5").prop("alt", "deshbandhu");
$("#urldivVividhData15-2").attr("href", result[5].Stories.redirectURL)
$("#urldivVividhData15-2").html(result[5].Stories.StoryHeading)
$("#dbtime5").html(result[5].Stories.UpdatedDate)
}
if (result[6].Stories.StoryImageThumb !== null && result[6].Stories.StoryImageThumb !== "" && result[6].Stories.StoryImageThumb !== undefined) {
$("#urldivVividhData16").attr("href", result[6].Stories.redirectURL)
$("#imgdivVividhData16").attr("src", $("#hdnStoryImage").val() + result[6].Stories.StoryImageThumb)
$("#imgdivVividhData16").prop("alt", result[6].Stories.StoryImageThumb.split("_")[2]);
$("#urldivVividhData16-2").attr("href", result[6].Stories.redirectURL)
$("#urldivVividhData16-2").html(result[6].Stories.StoryHeading)
$("#dbtime6").html(result[6].Stories.UpdatedDate)
}
else {
$("#urldivVividhData16").attr("href", result[6].Stories.redirectURL)
$("#imgdivVividhData16").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgdivVividhData6").prop("alt", "deshbandhu");
$("#urldivVividhData16-2").attr("href", result[6].Stories.redirectURL)
$("#urldivVividhData16-2").html(result[6].Stories.StoryHeading)
$("#dbtime6").html(result[6].Stories.UpdatedDate)
}
if (result[7].Stories.StoryImageThumb !== null && result[7].Stories.StoryImageThumb !== "" && result[7].Stories.StoryImageThumb !== undefined) {
$("#urldivVividhData17").attr("href", result[7].Stories.redirectURL)
$("#imgdivVividhData17").attr("src", $("#hdnStoryImage").val() + result[7].Stories.StoryImageThumb)
$("#imgdivVividhData17").prop("alt", result[7].Stories.StoryImageThumb.split("_")[2]);
$("#urldivVividhData17-2").attr("href", result[7].Stories.redirectURL)
$("#urldivVividhData17-2").html(result[7].Stories.StoryHeading)
$("#dbtime7").html(result[7].Stories.UpdatedDate)
}
else {
$("#urldivVividhData17").attr("href", result[7].Stories.redirectURL)
$("#imgdivVividhData17").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-55X55.jpg")
$("#imgdivVividhData17").prop("alt", "deshbandhu");
$("#urldivVividhData17-2").attr("href", result[7].Stories.redirectURL)
$("#urldivVividhData17-2").html(result[7].Stories.StoryHeading)
$("#dbtime7").html(result[7].Stories.UpdatedDate)
}
}
//$('#divVividhData1').html(htmlEntertainmentActive);
//$('#divVividhData2').html(htmlEntertainmentInActive);
//$(function () {
// $('#divVividhData1 img').each(function () {
// $(this).attr('src', $(this).attr('data-src'));
// });
//});
//$("#divLoadImage").hide();
//$(function () {
// $('#divVividhData2 img').each(function () {
// $(this).attr('src', $(this).attr('data-src'));
// });
//});
setTimeout(function () {
$('#SecVividh').show();
$('#SecHoroscope').show();
$('#SecRashifalSectionAdd').show();
BindEarthJagat();
}, 500);
}
else {
setTimeout(function () {
$('#SecVividh').show();
$('#SecHoroscope').show();
$('#SecRashifalSectionAdd').show();
BindEarthJagat();
}, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
setTimeout(function () {
$('#SecVividh').show();
$('#SecHoroscope').show();
$('#SecRashifalSectionAdd').show();
BindEarthJagat();
}, 500);
}
});
}
//Section 9 Functions End
//Section 9 Functions Start
function BindEarthJagat() {
//$("#divLoadImage").show();
//if ($('#divEarthJagat1').html().trim() == "" || $('#divEarthJagat2').html().trim() == "") {
$.ajax({
url: urlHomeSubcategorystory,
//data: { "CatID": 1, "scatid": 23, "days": "-" + $("#hdnDays").val() },
data: { "CatID": 1, "scatid": 23, "days": $("#hdnDays").val() },
type: 'GET',
dataType: 'json',
crossDomain: true,
// async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
//var htmlEarthJagatActive = "";
//var htmlEarthJagatInActive = "";
if (result !== null && result.length > 0) {
//Old Binding End
//for (var i = 0; i < result.length; i++) {
// if (i < 4) {
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// if (result[i].StoryImageThumb !== null && result[i].StoryImageThumb !== "" && result[i].StoryImageThumb !== undefined) {
// htmlEarthJagatActive += '
';
// }
// else {
// htmlEarthJagatActive += '
';
// }
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// if (result[i].StoryHeading !== null && result[i].StoryHeading !== undefined && result[i].StoryHeading !== "") {
// if (result[i].StoryHeading.trim().length > 60) {
// StoryTitle = result[i].StoryHeading.trim().substring(0, 60) + "...";
// }
// else {
// StoryTitle = result[i].StoryHeading.trim();
// }
// }
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// //htmlEarthJagatActive += '' + result[i].UpdatedDate + '';
// htmlEarthJagatActive += '' + result[i].storydate + '';
// htmlEarthJagatActive += '';
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// //htmlEarthJagatActive += '
';
// //htmlEarthJagatActive += '
';
// //htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// htmlEarthJagatActive += '
';
// }
// else {
// if (i < 8) {
// htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// if (result[i].StoryImageThumb !== null && result[i].StoryImageThumb !== "" && result[i].StoryImageThumb !== undefined) {
// htmlEarthJagatInActive += '
';
// }
// else {
// htmlEarthJagatInActive += '
';
// }
// htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// if (result[i].StoryHeading !== null && result[i].StoryHeading !== undefined && result[i].StoryHeading !== "") {
// if (result[i].StoryHeading.trim().length > 60) {
// StoryTitle = result[i].StoryHeading.trim().substring(0, 60) + "...";
// }
// else {
// StoryTitle = result[i].StoryHeading.trim();
// }
// }
// htmlEarthJagatInActive += '
';
// //htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// //htmlEarthJagatInActive += '' + result[i].UpdatedDate + '';
// htmlEarthJagatInActive += '' + result[i].storydate + '';
// htmlEarthJagatInActive += '';
// htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// //htmlEarthJagatInActive += '
';
// //htmlEarthJagatInActive += '
';
// //htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// htmlEarthJagatInActive += '
';
// }
// }
// //$('#divEarthJagat1').html(htmlEarthJagatActive);
// //$('#divEarthJagat2').html(htmlEarthJagatInActive);
// //$(function () {
// // $('#divEarthJagat1 img').each(function () {
// // $(this).attr('src', $(this).attr('data-src'));
// // });
// //});
// //$(function () {
// // $('#divEarthJagat2 img').each(function () {
// // $(this).attr('src', $(this).attr('data-src'));
// // });
// //});
// //setTimeout(function () {
// //$("#divLoadImage").hide();
// $('#secEarthJagatNews').show();
// //setTimeout(function () {
// // $("#divLoadImage").hide();
// // $("#divLoadMore").show();
// // BindHomeVideo();
// //}, 500);
// // BindHomeVideo();
// //}, 500);
//}
if (result[0].StoryHeading !== null && result[0].StoryHeading !== undefined && result[0].StoryHeading !== "") {
$("#urlEarthJagat").attr("href", result[0].redirectURL)
$("#imgEarthJagat").attr("src", $("#hdnStoryImage").val() + result[0].StoryImageThumb)
$("#imgEarthJagat").prop("alt", result[0].StoryImageThumb.split("_")[2]);
$("#urlEarthJagat-2").attr("href", result[0].redirectURL)
$("#uptime").html(result[0].storydate)
if (result[0].StoryHeading.trim().length > 60) {
$("#urlEarthJagat-2").html(result[0].StoryHeading.trim().substring(0, 60) + "...");
}
else {
$("#urlEarthJagat-2").html(result[0].StoryHeading);
}
}
if (result[1].StoryHeading !== null && result[1].StoryHeading !== undefined && result[1].StoryHeading !== "") {
$("#urlEarthJagat1").attr("href", result[1].redirectURL)
$("#imgEarthJagat1").attr("src", $("#hdnStoryImage").val() + result[1].StoryImageThumb)
$("#imgEarthJagat1").prop("alt", result[1].StoryImageThumb.split("_")[2]);
$("#urlEarthJagat1-2").attr("href", result[1].redirectURL)
$("#uptime1").html(result[1].storydate)
if (result[1].StoryHeading.trim().length > 60) {
$("#urlEarthJagat1-2").html(result[1].StoryHeading.trim().substring(0, 60) + "...");
}
else {
$("#urlEarthJagat1-2").html(result[1].StoryHeading);
}
}
if (result[2].StoryHeading !== null && result[2].StoryHeading !== undefined && result[2].StoryHeading !== "") {
$("#urlEarthJagat2").attr("href", result[2].redirectURL)
$("#imgEarthJagat2").attr("src", $("#hdnStoryImage").val() + result[2].StoryImageThumb)
$("#imgEarthJagat2").prop("alt", result[2].StoryImageThumb.split("_")[2]);
$("#urlEarthJagat2-2").attr("href", result[2].redirectURL)
$("#uptime2").html(result[2].storydate)
if (result[2].StoryHeading.trim().length > 60) {
$("#urlEarthJagat2-2").html(result[2].StoryHeading.trim().substring(0, 60) + "...");
}
else {
$("#urlEarthJagat2-2").html(result[2].StoryHeading);
}
}
if (result[3].StoryHeading !== null && result[3].StoryHeading !== undefined && result[3].StoryHeading !== "") {
$("#urlEarthJagat3").attr("href", result[3].redirectURL)
$("#imgEarthJagat3").attr("src", $("#hdnStoryImage").val() + result[3].StoryImageThumb)
$("#imgEarthJagat3").prop("alt", result[3].StoryImageThumb.split("_")[2]);
$("#urlEarthJagat3-2").attr("href", result[3].redirectURL)
$("#uptime3").html(result[3].storydate)
if (result[3].StoryHeading.trim().length > 60) {
$("#urlEarthJagat3-2").html(result[3].StoryHeading.trim().substring(0, 60) + "...");
}
else {
$("#urlEarthJagat3-2").html(result[3].StoryHeading);
}
}
if (result[4].StoryHeading !== null && result[4].StoryHeading !== undefined && result[4].StoryHeading !== "") {
$("#urlEarthJagat4").attr("href", result[4].redirectURL)
$("#imgEarthJagat4").attr("src", $("#hdnStoryImage").val() + result[4].StoryImageThumb)
$("#imgEarthJagat4").prop("alt", result[4].StoryImageThumb.split("_")[2]);
$("#urlEarthJagat4-2").attr("href", result[4].redirectURL)
$("#uptime4").html(result[4].storydate)
if (result[4].StoryHeading.trim().length > 60) {
$("#urlEarthJagat4-2").html(result[4].StoryHeading.trim().substring(0, 60) + "...");
}
else {
$("#urlEarthJagat4-2").html(result[4].StoryHeading);
}
}
if (result[5].StoryHeading !== null && result[5].StoryHeading !== undefined && result[5].StoryHeading !== "") {
$("#urlEarthJagat5").attr("href", result[5].redirectURL)
$("#imgEarthJagat5").attr("src", $("#hdnStoryImage").val() + result[5].StoryImageThumb)
$("#imgEarthJagat5").prop("alt", result[5].StoryImageThumb.split("_")[2]);
$("#urlEarthJagat5-2").attr("href", result[5].redirectURL)
$("#uptime5").html(result[5].storydate)
if (result[5].StoryHeading.trim().length > 60) {
$("#urlEarthJagat5-2").html(result[5].StoryHeading.trim().substring(0, 60) + "...");
}
else {
$("#urlEarthJagat5-2").html(result[5].StoryHeading);
}
}
if (result[6].StoryHeading !== null && result[6].StoryHeading !== undefined && result[6].StoryHeading !== "") {
$("#urlEarthJagat6").attr("href", result[6].redirectURL)
$("#imgEarthJagat6").attr("src", $("#hdnStoryImage").val() + result[6].StoryImageThumb)
$("#imgEarthJagat6").prop("alt", result[6].StoryImageThumb.split("_")[2]);
$("#urlEarthJagat6-2").attr("href", result[6].redirectURL)
$("#uptime6").html(result[6].storydate)
if (result[6].StoryHeading.trim().length > 60) {
$("#urlEarthJagat6-2").html(result[6].StoryHeading.trim().substring(0, 60) + "...");
}
else {
$("#urlEarthJagat6-2").html(result[6].StoryHeading);
}
}
if (result[7].StoryHeading !== null && result[7].StoryHeading !== undefined && result[7].StoryHeading !== "") {
$("#urlEarthJagat7").attr("href", result[7].redirectURL)
$("#imgEarthJagat7").attr("src", $("#hdnStoryImage").val() + result[7].StoryImageThumb)
$("#imgEarthJagat7").prop("alt", result[7].StoryImageThumb.split("_")[2]);
$("#urlEarthJagat7-2").attr("href", result[7].redirectURL)
$("#uptime7").html(result[7].storydate)
if (result[7].StoryHeading.trim().length > 70) {
$("#urlEarthJagat7-2").html(result[7].StoryHeading.trim().substring(0, 70) + "...");
}
else {
$("#urlEarthJagat7-2").html(result[7].StoryHeading);
}
}
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindHomeVideo();
}, 500);
BindHomeVideo();
$('#secEarthJagatNews').show();
}
}
else {
$('#secEarthJagatNews').show();
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindHomeVideo();
}, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
$('#secEarthJagatNews').show();
setTimeout(function () {
$("#divLoadImage").hide();
$("#divLoadMore").show();
BindHomeVideo();
}, 500);
}
});
}
//Section 9 Functions End
//Section 9 Functions Start
function BindHomeVideo() {
$("#divLoadImage").show();
if ($('#divNewideoGallery').html().trim() == "") {
$.ajax({
url: urlHomeVideo,
data: { "toprecord": "8" },
type: 'GET',
dataType: 'json',
crossDomain: true,
// async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
var htmlVideo = "";
var MaxItem = 8;
if (result !== null && result.length > 0) {
if (MaxItem > result.length) {
MaxItem = result.length;
}
//for (var i = 0; i < MaxItem; i++) {
// htmlVideo += '
';
//}
for (var i = 0; i < MaxItem; i++) {
htmlVideo += '
';
}
}
$('#divNewideoGallery').html(htmlVideo);
$(function () {
$('#divNewideoGallery img').each(function () {
$(this).attr('src', $(this).attr('data-src'));
});
});
$("#divLoadImage").hide();
setTimeout(function () { BindPhotosGallery(); }, 500);
}
else {
setTimeout(function () { BindPhotosGallery(); }, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
setTimeout(function () { BindPhotosGallery(); }, 500);
}
});
}
}
function BindPhotosGallery() {
$("#divLoadImage").show();
if ($('#divNewPhotosGallery').html().trim() == "") {
$.ajax({
url: urlPhotosGalleryHomePageData,
type: 'GET',
dataType: 'json',
crossDomain: true,
// async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
var htmlPGallery = "";
var chkID = "";
if (result !== null && result.length > 0) {
for (var i = 0; i < result.length; i++) {
if (i == 0)
htmlPGallery += '
';
else
htmlPGallery += '
';
htmlPGallery += '
';
htmlPGallery += '
';
if (result[i].img_path !== null && result[i].img_path !== "" && result[i].img_path !== undefined) {
htmlPGallery += '
';
}
else {
htmlPGallery += '
';
}
htmlPGallery += '
';
htmlPGallery += '
';
htmlPGallery += '
';
htmlPGallery += '
';
htmlPGallery += '
';
htmlPGallery += '
';
}
}
chkID = "";
$('#divNewPhotosGallery').html(htmlPGallery);
$(function () {
$('#divNewPhotosGallery img').each(function () {
$(this).attr('src', $(this).attr('data-src'));
});
});
$("#divLoadImage").hide();
setTimeout(function () {
$('#video-thumb-gallery').show();
BindHealthNews();
}, 500);
}
else {
setTimeout(function () {
$('#video-thumb-gallery').show();
BindHealthNews();
}, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
setTimeout(function () {
$('#video-thumb-gallery').show();
BindHealthNews();
}, 500);
}
});
}
}
//Section 9 Functions End
//Section 10 Functions Start
function BindHealthNews() {
//$("#divLoadImage").show();
//if ($('#healthNews').html().trim() == "") {
$.ajax({
url: urlHomeSubcategoryMiscstoryAlekh,// Changed to Get Story From Story Page and Editorial Page
// url: urlHomeSubcategoryMiscstory,
//data: { "CatID": 9, "scatid": 197, "days": "-" + $("#hdnDays").val() },
data: { "CatID": 9, "scatid": 197, "days": $("#hdnDays").val() },
type: 'GET',
dataType: 'json',
crossDomain: true,
//async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
//var htmlHealth = "";
//if (result !== null && result.length > 0) {
// htmlHealth += '
';
// htmlHealth += '
';
// htmlHealth += '
';
// for (var i = 0; i < result.length; i++) {
// htmlHealth += '
';
// htmlHealth += '
';
// if (result[i].storyimage1 !== null && result[i].storyimage1 !== "" && result[i].storyimage1 !== undefined) {
// htmlHealth += '
';
// }
// else {
// htmlHealth += '
';
// }
// htmlHealth += '
';
// htmlHealth += '
';
// htmlHealth += '
';
// htmlHealth += '
';
// htmlHealth += '
';
// }
//}
//$('#healthNews').html(htmlHealth);
//$("#divLoadImage").hide();
if (result[0].storyimage1 !== null && result[0].storyimage1 !== "" && result[0].storyimage1 !== undefined) {
$("#urlhealthNews").attr("href", result[0].redirectURL)
$("#imghealthNews").attr("src", $("#hdnStoryImage").val() + result[0].storyimage1)
$("#imghealthNews").prop("alt", result[0].storyimage1.split("_")[1]);
$("#urlhealthNews-2").attr("href", result[0].redirectURL)
$("#urlhealthNews-2").html(result[0].StoryHeading)
}
else {
$("#urlhealthNews").attr("href", result[0].redirectURL)
$("#imghealthNews").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imghealthNews").prop("alt", "deshbandhu");
$("#urlhealthNews-2").attr("href", result[0].redirectURL)
$("#urlhealthNews-2").html(result[0].StoryHeading)
}
if (result[1].storyimage1 !== null && result[1].storyimage1 !== "" && result[1].storyimage1 !== undefined) {
$("#urlhealthNews1").attr("href", result[1].redirectURL)
$("#imghealthNews1").attr("src", $("#hdnStoryImage").val() + result[1].storyimage1)
$("#imghealthNews1").prop("alt", result[1].storyimage1.split("_")[1]);
$("#urlhealthNews1-2").attr("href", result[1].redirectURL)
$("#urlhealthNews1-2").html(result[1].StoryHeading)
}
else {
$("#urlhealthNews1").attr("href", result[1].redirectURL)
$("#imghealthNews1").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imghealthNews1").prop("alt", "deshbandhu");
$("#urlhealthNews1-2").attr("href", result[1].redirectURL)
$("#urlhealthNews1-2").html(result[1].StoryHeading)
}
if (result[2].storyimage1 !== null && result[2].storyimage1 !== "" && result[2].storyimage1 !== undefined) {
$("#urlhealthNews2").attr("href", result[1].redirectURL)
$("#imghealthNews2").attr("src", $("#hdnStoryImage").val() + result[2].storyimage1)
$("#imghealthNews2").prop("alt", result[2].storyimage1.split("_")[1]);
$("#urlhealthNews2-2").attr("href", result[2].redirectURL)
$("#urlhealthNews2-2").html(result[2].StoryHeading)
}
else {
$("#urlhealthNews2").attr("href", result[2].redirectURL)
$("#imghealthNews2").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imghealthNews2").prop("alt", "deshbandhu");
$("#urlhealthNews2-2").attr("href", result[2].redirectURL)
$("#urlhealthNews2-2").html(result[2].StoryHeading)
}
if (result[3].storyimage1 !== null && result[3].storyimage1 !== "" && result[3].storyimage1 !== undefined) {
$("#urlhealthNews3").attr("href", result[3].redirectURL)
$("#imghealthNews3").attr("src", $("#hdnStoryImage").val() + result[3].storyimage1)
$("#imghealthNews3").prop("alt", result[3].storyimage1.split("_")[1]);
$("#urlhealthNews3-2").attr("href", result[3].redirectURL)
$("#urlhealthNews3-2").html(result[3].StoryHeading)
}
else {
$("#urlhealthNews3").attr("href", result[3].redirectURL)
$("#imghealthNews3").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imghealthNews3").prop("alt", "deshbandhu");
$("#urlhealthNews3-2").attr("href", result[3].redirectURL)
$("#urlhealthNews3-2").html(result[3].StoryHeading)
}
if (result[4].storyimage1 !== null && result[4].storyimage1 !== "" && result[4].storyimage1 !== undefined) {
$("#urlhealthNews4").attr("href", result[4].redirectURL)
$("#imghealthNews4").attr("src", $("#hdnStoryImage").val() + result[4].storyimage1)
$("#imghealthNews4").prop("alt", result[4].storyimage1.split("_")[1]);
$("#urlhealthNews4-2").attr("href", result[4].redirectURL)
$("#urlhealthNews4-2").html(result[4].StoryHeading)
}
else {
$("#urlhealthNews4").attr("href", result[4].redirectURL)
$("#imghealthNews4").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imghealthNews4").prop("alt", "deshbandhu");
$("#urlhealthNews4-2").attr("href", result[4].redirectURL)
$("#urlhealthNews4-2").html(result[4].StoryHeading)
}
if (result[5].storyimage1 !== null && result[5].storyimage1 !== "" && result[5].storyimage1 !== undefined) {
$("#urlhealthNews5").attr("href", result[5].redirectURL)
$("#imghealthNews5").attr("src", $("#hdnStoryImage").val() + result[5].storyimage1)
$("#imghealthNews5").prop("alt", result[5].storyimage1.split("_")[1]);
$("#urlhealthNews5-2").attr("href", result[5].redirectURL)
$("#urlhealthNews5-2").html(result[5].StoryHeading)
}
else {
$("#urlhealthNews5").attr("href", result[5].redirectURL)
$("#imghealthNews5").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imghealthNews5").prop("alt", "deshbandhu");
$("#urlhealthNews5-2").attr("href", result[5].redirectURL)
$("#urlhealthNews5-2").html(result[5].StoryHeading)
}
if (result[6].storyimage1 !== null && result[6].storyimage1 !== "" && result[6].storyimage1 !== undefined) {
$("#urlhealthNews6").attr("href", result[6].redirectURL)
$("#imghealthNews6").attr("src", $("#hdnStoryImage").val() + result[6].storyimage1)
$("#imghealthNews6").prop("alt", result[6].storyimage1.split("_")[1]);
$("#urlhealthNews6-2").attr("href", result[6].redirectURL)
$("#urlhealthNews6-2").html(result[6].StoryHeading)
}
else {
$("#urlhealthNews6").attr("href", result[6].redirectURL)
$("#imghealthNews6").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imghealthNews6").prop("alt", "deshbandhu");
$("#urlhealthNews6-2").attr("href", result[6].redirectURL)
$("#urlhealthNews6-2").html(result[6].StoryHeading)
}
if (result[7].storyimage1 !== null && result[7].storyimage1 !== "" && result[7].storyimage1 !== undefined) {
$("#urlhealthNews7").attr("href", result[7].redirectURL)
$("#imghealthNews7").attr("src", $("#hdnStoryImage").val() + result[7].storyimage1)
$("#imghealthNews7").prop("alt", result[7].storyimage1.split("_")[1]);
$("#urlhealthNews7-2").attr("href", result[7].redirectURL)
$("#urlhealthNews7-2").html(result[7].StoryHeading)
}
else {
$("#urlhealthNews7").attr("href", result[7].redirectURL)
$("#imghealthNews7").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imghealthNews7").prop("alt", "deshbandhu");
$("#urlhealthNews7-2").attr("href", result[7].redirectURL)
$("#urlhealthNews7-2").html(result[7].StoryHeading)
}
setTimeout(function () { BindScienceKnowledgeNews(); }, 500);
}
else {
setTimeout(function () { BindScienceKnowledgeNews(); }, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
setTimeout(function () { BindScienceKnowledgeNews(); }, 500);
}
});
}
function BindScienceKnowledgeNews() {
//$("#divLoadImage").show();
//if ($('#ScienceNews').html().trim() == "") {
$.ajax({
url: urlHomeSubcategoryMiscstoryAlekh,// Changed to Get Story From Story Page and Editorial Page
// url: urlHomeSubcategoryMiscstory,
//data: { "CatID": 9, "scatid": 241, "days": "-" + $("#hdnDays").val() },
data: { "CatID": 9, "scatid": 241, "days": $("#hdnDays").val() },
type: 'GET',
dataType: 'json',
crossDomain: true,
//async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
var htmlScience = "";
if (result !== null && result.length > 0) {
//htmlScience += '
';
//htmlScience += '
';
//htmlScience += '
';
////for (var i = 0; i < result.length; i++) {
//for (var i = 0; i < result.length; i++) {
// htmlScience += '
';
// htmlScience += '
';
// if (result[i].storyimage1 !== null && result[i].storyimage1 !== "" && result[i].storyimage1 !== undefined) {
// htmlScience += '
';
// }
// else {
// htmlScience += '
';
// }
// htmlScience += '
';
// htmlScience += '
';
// htmlScience += '
';
// htmlScience += '
';
// htmlScience += '
';
//}
}
//$('#ScienceNews').html(htmlScience);
//$("#divLoadImage").hide();
if (result[0].storyimage1 !== null && result[0].storyimage1 !== "" && result[0].storyimage1 !== undefined) {
$("#urlScienceNews").attr("href", result[0].redirectURL)
$("#imgScienceNews").attr("src", $("#hdnStoryImage").val() + result[0].storyimage1)
$("#imgScienceNews").prop("alt", result[0].storyimage1.split("_")[1]);
$("#urlScienceNews-2").attr("href", result[0].redirectURL)
$("#urlScienceNews-2").html(result[0].StoryHeading)
}
else {
$("#urlScienceNews").attr("href", result[0].redirectURL)
$("#imgScienceNews").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgScienceNews").prop("alt", "deshbandhu");
$("#urlScienceNews-2").attr("href", result[0].redirectURL)
$("#urlScienceNews-2").html(result[0].StoryHeading)
}
if (result[1].storyimage1 !== null && result[1].storyimage1 !== "" && result[1].storyimage1 !== undefined) {
$("#urlScienceNews1").attr("href", result[1].redirectURL)
$("#imgScienceNews1").attr("src", $("#hdnStoryImage").val() + result[1].storyimage1)
$("#imgScienceNews1").prop("alt", result[0].storyimage1.split("_")[1]);
$("#urlScienceNews1-2").attr("href", result[1].redirectURL)
$("#urlScienceNews1-2").html(result[1].StoryHeading)
}
else {
$("#urlScienceNews1").attr("href", result[1].redirectURL)
$("#imgScienceNews1").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgScienceNews1").prop("alt", "deshbandhu");
$("#urlScienceNews1-2").attr("href", result[1].redirectURL)
$("#urlScienceNews1-2").html(result[1].StoryHeading)
}
if (result[2].storyimage1 !== null && result[2].storyimage1 !== "" && result[2].storyimage1 !== undefined) {
$("#urlScienceNews2").attr("href", result[2].redirectURL)
$("#imgScienceNews2").attr("src", $("#hdnStoryImage").val() + result[2].storyimage1)
$("#imgScienceNews2").prop("alt", result[2].storyimage1.split("_")[1]);
$("#urlScienceNews2-2").attr("href", result[1].redirectURL)
$("#urlScienceNews2-2").html(result[2].StoryHeading)
}
else {
$("#urlScienceNews2").attr("href", result[2].redirectURL)
$("#imgScienceNews2").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgScienceNews2").prop("alt", "deshbandhu");
$("#urlScienceNews2-2").attr("href", result[2].redirectURL)
$("#urlScienceNews2-2").html(result[2].StoryHeading)
}
if (result[3].storyimage1 !== null && result[3].storyimage1 !== "" && result[3].storyimage1 !== undefined) {
$("#urlScienceNews3").attr("href", result[3].redirectURL)
$("#imgScienceNews3").attr("src", $("#hdnStoryImage").val() + result[3].storyimage1)
$("#imgScienceNews3").prop("alt", result[3].storyimage1.split("_")[1]);
$("#urlScienceNews3-2").attr("href", result[3].redirectURL)
$("#urlScienceNews3-2").html(result[3].StoryHeading)
}
else {
$("#urlScienceNews3").attr("href", result[3].redirectURL)
$("#imgScienceNews3").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgScienceNews3").prop("alt", "deshbandhu");
$("#urlScienceNews3-2").attr("href", result[3].redirectURL)
$("#urlScienceNews3-2").html(result[3].StoryHeading)
}
if (result[4].storyimage1 !== null && result[4].storyimage1 !== "" && result[4].storyimage1 !== undefined) {
$("#urlScienceNews4").attr("href", result[4].redirectURL)
$("#imgScienceNews4").attr("src", $("#hdnStoryImage").val() + result[4].storyimage1)
$("#imgScienceNews4").prop("alt", result[4].storyimage1.split("_")[1]);
$("#urlScienceNews4-2").attr("href", result[4].redirectURL)
$("#urlScienceNews4-2").html(result[4].StoryHeading)
}
else {
$("#urlScienceNews4").attr("href", result[4].redirectURL)
$("#imgScienceNews4").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgScienceNews4").prop("alt", "deshbandhu");
$("#urlScienceNews4-2").attr("href", result[4].redirectURL)
$("#urlScienceNews4-2").html(result[4].StoryHeading)
}
if (result[5].storyimage1 !== null && result[5].storyimage1 !== "" && result[5].storyimage1 !== undefined) {
$("#urlScienceNews5").attr("href", result[5].redirectURL)
$("#imgScienceNews5").attr("src", $("#hdnStoryImage").val() + result[5].storyimage1)
$("#imgScienceNews5").prop("alt", result[5].storyimage1.split("_")[1]);
$("#urlScienceNews5-2").attr("href", result[5].redirectURL)
$("#urlScienceNews5-2").html(result[5].StoryHeading)
}
else {
$("#urlScienceNews5").attr("href", result[5].redirectURL)
$("#imgScienceNews5").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgScienceNews5").prop("alt", "deshbandhu");
$("#urlScienceNews5-2").attr("href", result[5].redirectURL)
$("#urlScienceNews5-2").html(result[5].StoryHeading)
}
if (result[6].storyimage1 !== null && result[6].storyimage1 !== "" && result[6].storyimage1 !== undefined) {
$("#urlScienceNews6").attr("href", result[6].redirectURL)
$("#imgScienceNews6").attr("src", $("#hdnStoryImage").val() + result[6].storyimage1)
$("#imgScienceNews6").prop("alt", result[6].storyimage1.split("_")[1]);
$("#urlScienceNews6-2").attr("href", result[6].redirectURL)
$("#urlScienceNews6-2").html(result[6].StoryHeading)
}
else {
$("#urlScienceNews6").attr("href", result[6].redirectURL)
$("#imgScienceNews6").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgScienceNews6").prop("alt", "deshbandhu");
$("#urlScienceNews6-2").attr("href", result[6].redirectURL)
$("#urlScienceNews6-2").html(result[6].StoryHeading)
}
if (result[7].storyimage1 !== null && result[7].storyimage1 !== "" && result[7].storyimage1 !== undefined) {
$("#urlScienceNews7").attr("href", result[7].redirectURL)
$("#imgScienceNews7").attr("src", $("#hdnStoryImage").val() + result[7].storyimage1)
$("#imgScienceNews7").prop("alt", result[7].storyimage1.split("_")[1]);
$("#urlScienceNews7-2").attr("href", result[7].redirectURL)
$("#urlScienceNews7-2").html(result[7].StoryHeading)
}
else {
$("#urlScienceNews7").attr("href", result[7].redirectURL)
$("#imgScienceNews7").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgScienceNews7").prop("alt", "deshbandhu");
$("#urlScienceNews7-2").attr("href", result[7].redirectURL)
$("#urlScienceNews7-2").html(result[7].StoryHeading)
}
setTimeout(function () {
$('#secHealth').show();
BindLeavePointsNews();
}, 500);
}
else {
setTimeout(function () {
$('#secHealth').show();
BindLeavePointsNews();
}, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
setTimeout(function () {
$('#secHealth').show();
BindLeavePointsNews();
}, 500);
}
});
}
//Section 10 Functions End
//Section 11 Functions Start
function BindLeavePointsNews() {
//i/*f ($('#leavePointsNews').html().trim() == "") {*/
$.ajax({
url: urlHomeSubcategoryMiscstoryAlekh,// Changed to Get Story From Story Page and Editorial Page
// url: urlHomeSubcategoryMiscstory,
//data: { "CatID": 3, "scatid": 52, "days": "-" + $("#hdnDays").val() },
data: { "CatID": 3, "scatid": 52, "days": $("#hdnDays").val() },
type: 'GET',
dataType: 'json',
crossDomain: true,
// async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
//var htmlleavePointsNews = "";
// if (result !== null && result.length > 0) {
//htmlleavePointsNews += '
';
//htmlleavePointsNews += '
';
//htmlleavePointsNews += '
';
////htmlleavePointsNews += '
';
// htmlleavePointsNews += '
';
// htmlleavePointsNews += '
';
// if (result[i].StoryImageThumb !== null && result[i].StoryImageThumb !== "" && result[i].StoryImageThumb !== undefined) {
// htmlleavePointsNews += '
';
// }
// else {
// htmlleavePointsNews += '
';
// }
// htmlleavePointsNews += '
';
// htmlleavePointsNews += '
';
// htmlleavePointsNews += '
';
// htmlleavePointsNews += '
';
// htmlleavePointsNews += '
';
// htmlleavePointsNews += '
';
//}
//}
//htmlleavePointsNews += '
';
//$('#leavePointsNews').html(htmlleavePointsNews);
if (result[0].StoryImageThumb !== null && result[0].StoryImageThumb !== "" && result[0].StoryImageThumb !== undefined) {
$("#urlleavePointsNews").attr("href", result[0].redirectURL)
$("#imgleavePointsNews").attr("src", $("#hdnStoryImage").val() + result[0].StoryImageThumb)
$("#imgleavePointsNews").prop("alt", result[0].StoryImageThumb.split("_")[2]);
$("#urlleavePointsNews-2").attr("href", result[0].redirectURL)
$("#urlleavePointsNews-2").html(result[0].StoryHeading)
}
else {
$("#urlleavePointsNews").attr("href", result[0].redirectURL)
$("#imgleavePointsNews").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgleavePointsNews").prop("alt", "deshbandhu");
$("#urlleavePointsNews-2").attr("href", result[0].redirectURL)
$("#urlleavePointsNews-2").html(result[0].StoryHeading)
}
if (result[1].StoryImageThumb !== null && result[1].StoryImageThumb !== "" && result[1].StoryImageThumb !== undefined) {
$("#urlleavePointsNews1").attr("href", result[1].redirectURL)
$("#imgleavePointsNews1").attr("src", $("#hdnStoryImage").val() + result[1].StoryImageThumb)
$("#imgleavePointsNews1").prop("alt", result[1].StoryImageThumb.split("_")[2]);
$("#urlleavePointsNews1-2").attr("href", result[1].redirectURL)
$("#urlleavePointsNews1-2").html(result[1].StoryHeading)
}
else {
$("#urlleavePointsNews1").attr("href", result[1].redirectURL)
$("#imgleavePointsNews1").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgleavePointsNews1").prop("alt", "deshbandhu");
$("#urlleavePointsNews1-2").attr("href", result[1].redirectURL)
$("#urlleavePointsNews1-2").html(result[1].StoryHeading)
}
if (result[2].StoryImageThumb !== null && result[2].StoryImageThumb !== "" && result[2].StoryImageThumb !== undefined) {
$("#urlleavePointsNews2").attr("href", result[2].redirectURL)
$("#imgleavePointsNews2").attr("src", $("#hdnStoryImage").val() + result[2].StoryImageThumb)
$("#imgleavePointsNews2").prop("alt", result[2].StoryImageThumb.split("_")[2]);
$("#urlleavePointsNews2-2").attr("href", result[2].redirectURL)
$("#urlleavePointsNews2-2").html(result[2].StoryHeading)
}
else {
$("#urlleavePointsNews2").attr("href", result[2].redirectURL)
$("#imgleavePointsNews2").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgleavePointsNews2").prop("alt", "deshbandhu");
$("#urlleavePointsNews2-2").attr("href", result[2].redirectURL)
$("#urlleavePointsNews2-2").html(result[2].StoryHeading)
}
if (result[3].StoryImageThumb !== null && result[3].StoryImageThumb !== "" && result[3].StoryImageThumb !== undefined) {
$("#urlleavePointsNews3").attr("href", result[3].redirectURL)
$("#imgleavePointsNews3").attr("src", $("#hdnStoryImage").val() + result[3].StoryImageThumb)
$("#imgleavePointsNews3").prop("alt", result[3].StoryImageThumb.split("_")[2]);
$("#urlleavePointsNews3-2").attr("href", result[3].redirectURL)
$("#urlleavePointsNews3-2").html(result[3].StoryHeading)
}
else {
$("#urlleavePointsNews3").attr("href", result[3].redirectURL)
$("#imgleavePointsNews3").attr("src", "https://www.deshbandhu.co.in/images/placeholders/db-img-placeholder-297x220-2.jpg")
$("#imgleavePointsNews3").prop("alt", "deshbandhu");
$("#urlleavePointsNews3-2").attr("href", result[3].redirectURL)
$("#urlleavePointsNews3-2").html(result[3].StoryHeading)
}
setTimeout(function () {
$('#secHoliday').show();
$("#divLoadImage").hide();
$("#divLoadMore").hide();
$("#DivMainLoader").hide();
BindHeaderAdds();
}, 500);
}
else {
setTimeout(function () {
$('#secHoliday').show();
$("#divLoadImage").hide();
$("#divLoadMore").hide();
$("#DivMainLoader").hide();
BindHeaderAdds();
}, 500);
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
setTimeout(function () {
$('#secHoliday').show();
$("#divLoadImage").hide();
$("#divLoadMore").hide();
$("#DivMainLoader").hide();
BindHeaderAdds();
}, 500);
}
});
}
//Section 11 Functions End
function BindHoroscopes() {
$('#ariesdailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/aries-daily", target: "_blank" });
$('#taurusdailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/taurus-daily", target: "_blank" });
$('#geminidailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/gemini-daily", target: "_blank" });
$('#cancerdailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/cancer-daily", target: "_blank" });
$('#leodailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/leo-daily", target: "_blank" });
$('#virgodailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/virgo-daily", target: "_blank" });
$('#libradailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/libra-daily", target: "_blank" });
$('#scorpiodailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/scorpio-daily", target: "_blank" });
$('#sagittariusdailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/sagittarius-daily", target: "_blank" });
$('#capricorndailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/capricorn-daily", target: "_blank" });
$('#aquariusdailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/aquarius-daily", target: "_blank" });
$('#piscesdailyHoro').attr({ href: "https://www.deshbandhu.co.in/rashifal-horoscope/pisces-daily", target: "_blank" });
}
function BindSRCByID(VideoID) {
//var srcPath = src.split('_')[0] + src.split('_')[1];
//var videoCaption = src.split('_')[2];
var srcPath = $("#divVideoData_" + VideoID).attr("video-data");
var videoCaption = $("#divVideoData_" + VideoID).find(".gallery-title").html();
if (srcPath == null || srcPath == undefined || srcPath == "") {
$('#lnkSRC').removeAttr("data-toggle");
$('#lnkSRC').removeAttr("data-target");
}
if (videoCaption !== null || videoCaption !== undefined || videoCaption !== "") {
if (videoCaption.length > 55) {
videoCaption = videoCaption.trim().substring(0, 53) + "...";
}
htmlHeaderVideo = "";
htmlHeaderVideo += '
';
htmlHeaderVideo += '
' + videoCaption.trim() + '
';
}
$('#divHeaderVideo').html(htmlHeaderVideo);
var htmlLive = "";
htmlLive += '
';
htmlLive += '';
htmlLive += '';
htmlLive += '
';
htmlLive += '';
$('#divYouTubeLiveHome').html(htmlLive);
}
//function BindSRCByID(src) {
// var srcPath = src.split('_')[0] + src.split('_')[1];
// var videoCaption = src.split('_')[2];
// if (src == null || src == undefined || src == "") {
// $('#lnkSRC').removeAttr("data-toggle");
// $('#lnkSRC').removeAttr("data-target");
// }
// if (videoCaption !== null || videoCaption !== undefined || videoCaption !== "") {
// if (videoCaption.length > 55) {
// videoCaption = videoCaption.trim().substring(0, 53) + "...";
// }
// htmlHeaderVideo = "";
// htmlHeaderVideo += '
';
// htmlHeaderVideo += '
' + videoCaption.trim() + '
';
// }
// $('#divHeaderVideo').html(htmlHeaderVideo);
// var htmlLive = "";
// htmlLive += '
';
// htmlLive += '';
// htmlLive += '';
// htmlLive += '
';
// htmlLive += '';
// $('#divYouTubeLiveHome').html(htmlLive);
//}
function ClearVideoData() {
setTimeout(function () {
$('#divHeaderVideo').html("");
$('#divYouTubeLiveHome').html("");
}, 500);
}
function FillPopupData(storyID) {
$("#divdataHomeRelatedStory").html("");
$("#divPopupLoader").show();
$("#divMainNewsImage >img").attr("src", $("#divMailNewsMaster_" + storyID + " >div img").attr("src"));
$("#divMainNewsTitle h5 >a").html($("#divMailNewsMaster_" + storyID + " >div h5 >a").html());
$("#divMainNewsTitle h5 >a").attr("href", $("#divMailNewsMaster_" + storyID + " >div h5 >a").attr("href"));
if ($("#divdataHomeRelatedStory").html().trim() == "") {
$(".popup-html #content-9").css("min-height", "0px");
}
setTimeout(function () { Bind_Popup_Data(storyID); }, 500);
}
function FillPopupDataVividh(storyID) {
$("#divdataHomeRelatedStory").html("");
$("#divPopupLoader").show();
$("#divMainNewsImage >img").attr("src", $("#divVividhSectionItem_" + storyID + " >div img").attr("src"));
$("#divMainNewsTitle h5 >a").html($("#divVividhSectionItem_" + storyID + " >div h5 >a").html());
$("#divMainNewsTitle h5 >a").attr("href", $("#divVividhSectionItem_" + storyID + " >div h5 >a").attr("href"));
if ($("#divdataHomeRelatedStory").html().trim() == "") {
$(".popup-html #content-9").css("min-height", "0px");
}
setTimeout(function () { Bind_Popup_Data(storyID); }, 500);
}
function FillPopupDataEarthJagat(storyID) {
$("#divdataHomeRelatedStory").html("");
$("#divPopupLoader").show();
$("#divMainNewsImage >img").attr("src", $("#divEarthJagat_" + storyID + " >div img").attr("src"));
$("#divMainNewsTitle h5 >a").html($("#divEarthJagat_" + storyID + " >div h5 >a").html());
$("#divMainNewsTitle h5 >a").attr("href", $("#divEarthJagat_" + storyID + " >div h5 >a").attr("href"));
if ($("#divdataHomeRelatedStory").html().trim() == "") {
$(".popup-html #content-9").css("min-height", "0px");
}
setTimeout(function () { Bind_Popup_Data(storyID); }, 500);
}
function CloseMainNewsPopup() {
$("#divdataHomeRelatedStory").html("");
$("#divPopupLoader").show();
}
function Bind_Popup_Data(storyID) {
$.ajax({
url: urlHomeRelatedStory,
data: { "storyid": storyID },
type: 'GET',
dataType: 'json',
crossDomain: true,
//async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
if (result !== null && result.length > 0) {
var htmlHomeRelatedStories = "";
for (var i = 0; i < result.length; i++) {
if (i < 4) {
htmlHomeRelatedStories += '
';
htmlHomeRelatedStories += '
';
if (result[i].storyimagethumb !== null && result[i].storyimagethumb !== "" && result[i].storyimagethumb !== undefined) {
htmlHomeRelatedStories += '
';
}
else {
htmlHomeRelatedStories += '
';
}
htmlHomeRelatedStories += '
';
htmlHomeRelatedStories += '
';
htmlHomeRelatedStories += '
';
htmlHomeRelatedStories += '
';
htmlHomeRelatedStories += '
';
htmlHomeRelatedStories += '
';
htmlHomeRelatedStories += '
';
htmlHomeRelatedStories += '
';
htmlHomeRelatedStories += '
';
htmlHomeRelatedStories += '
';
htmlHomeRelatedStories += '
';
}
}
$("#divdataHomeRelatedStory").html(htmlHomeRelatedStories);
$(".popup-html #content-9").css("min-height", "520px");
$(".popup-html #content-9").css("transition", "all ease 0.10s");
$(".popup-html #content-9").css("max-height", "520px");
$("#divPopupLoader").hide();
$(function () {
$('#divdataHomeRelatedStory img').each(function () {
$(this).attr('src', $(this).attr('data-src'));
});
});
}
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
}
});
}
function RedirectToStateDDL(ctrl) {
$("#divEpaperImages a").attr("href", "/states/" + $("#" + ctrl).val().toString().trim());
}
function GotoHoroscope(hsign) {
//document.getElementById("%= Session['h_Sign']").val
$("#btnHoroscope").removeAttr("value");
$("#hdnHSign").val(hsign);
var btn = document.getElementById("btnHoroscope");
btn.click();
}
function BindAdds() {
$.ajax({
url: urlBindAdds,
data: { "pagename": 'homepage' },
type: 'GET',
dataType: 'json',
crossDomain: true,
async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
if (result !== null && result.length > 0) {
Addresult = result;
var htmlAdds = "";
// Binding Adds on the sections Start Here
for (var i = 0; i < result.length; i++) {
htmlAdds = "";
if (result[i].advfiletype.toString().trim().toLowerCase() == "script") {
htmlAdds += '
' + result[i].advfile + '
';
}
else if (result[i].advfiletype.toString().trim().toLowerCase == "swf") {
htmlAdds += "
";
htmlAdds += '
';
htmlAdds += '
';
htmlAdds += '';
htmlAdds += '
';
}
else {
htmlAdds += "
";
}
switch (result[i].placename) {
case "Video 300X600":
$("#divVideoAdd").html(htmlAdds);
$("#divVideoAdd").show();
break;
case "Sports 300x600":
$("#divSportsAds").html(htmlAdds);
break;
case "Entertainment 300X600":
$("#divEntertainmentAds").html(htmlAdds);
break;
case "Gallery 300X600":
$("#divGalleryAds").html(htmlAdds);
break;
case "Fix 270X230":
$("#divFix270X230Ads").html(htmlAdds);
break;
case "Fix2":
break;
case "Bottom 1023X100":
break;
default:
break;
}
}
// Binding Adds on the sections Ends Here
}
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
}
});
}
function BindFootercategory() {
$.ajax({
url: urlFootercategory,
type: 'GET',
dataType: 'json',
crossDomain: true,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
if (result !== null && result.length > 0) {
//BindImportantNews(1,19,-250);
//for (var i = 0; i < result.length; i++) {
//}
}
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
}
});
}
function FilterGallery(galleryID) {
//alert(galleryID);
var value = galleryID.trim().split('_')[1];
//var value = $(this).attr('data-filter');
if (value == "all") {
//$('.filter').removeClass('hidden');
$('.filter').show('3000');
}
else {
//$('.filter').show('3000');
$(".filter").not('.' + value).hide('1000');
//$(".filter").not('.' + value + ".hovereffect-wrapper:after").css("content", "none");
$('.filter').filter('.' + value).show('3000');
$(".row:after").css("clear", "both");
}
if ($(".filter-button").removeClass("active")) {
$(this).removeClass("active");
}
$(this).addClass("active");
}
function GotoEPaper() {
$("#btnEPaper").removeAttr("value");
var btn = document.getElementById("btnEPaper");
btn.click();
}
function LoadMoreHomePage() {
var LoadIndex = $("#hdnLoadIndex").val();
$("#divLoadMore").hide();
$("#divLoadImage").show();
switch (LoadIndex) {
case "1":
BindLowerNews();
// BindLowerNews();
BindSportsNews();
Bind_HomePage_Entertainment_Gallery();
$("#hdnLoadIndex").val("2");
break;
case "2":
BindHomePoliticalstory();
BindVividhSectionNews();
//$("#divLoadImage").hide();
//$("#divLoadMore").show();
$("#hdnLoadIndex").val("3");
break;
case "3":
BindHomeVideo();
//BindLowerNews();
////BindSubCategorybyCat();
//BindLowerNews();
//BindSportsNews();
$("#hdnLoadIndex").val("4");
break;
case "4":
// Bind_HomePage_Entertainment_Gallery();
$("#hdnLoadIndex").val("5");
break;
case "5":
// BindHomePoliticalstory();
$("#hdnLoadIndex").val("6");
break;
case "6":
//BindVividhSectionNews();
$("#hdnLoadIndex").val("7");
break;
case "7":
BindHomeVideo();
$("#hdnLoadIndex").val("1");
break;
}
}
//$(window).scroll(function () {
// if ($(window).scrollTop() >= $(document).height() - $(window).height()-100) {
// LoadMoreHomePage();
// }
//});
function BindHomePageAdvertiment(AdvertimentFor) {
$.ajax({
url: urlHomePageAdd,
data: { "AdvertimentFor": AdvertimentFor },
type: 'GET',
dataType: 'json',
crossDomain: true,
async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
if (result !== null && result.length > 0) {
var htmltext = "";
$('#imgHomeAdvertisement').attr("src", "https://www.deshbandhu.co.in/Admin/Advertisements/" + result[0].ImagePath);
$('#addImage').css("display", "flex");
}
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
}
});
}
function BindHomePageAdvertiment2(AdvertimentFor) {
$.ajax({
url: urlHomePageAdd2,
data: { "AdvertimentFor": AdvertimentFor },
type: 'GET',
dataType: 'json',
crossDomain: true,
async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
if (result !== null && result.length > 0) {
var htmltext = "";
if (result[0].VideoLink !== null && result[0].VideoLink !== "") {
$("#imgDiv").hide();
$("#videoDiv").show();
setTimeout(function () {
$('#videoHomeAdvertisement2').attr("src", result[0].VideoLink);
}, 500);
$('#addImage').css("display", "flex");
}
else {
$('#imgHomeAdvertisement2').attr("src", "https://www.deshbandhu.co.in/Admin/Advertisements/" + result[0].ImagePath);
$('#addImage').css("display", "flex");
}
}
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
}
});
}
function BindMainWebStory() {
$.ajax({
url: urlHomeWebStory,
data: {},
type: 'GET',
dataType: 'json',
crossDomain: true,
async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
var htmltext = "";
$("#lblWebStory").html("");
if (result !== null && result.length > 0) {
for (var i = 0; i < result.length; i++) {
htmltext += '
';
}
$("#divAllWebStory").html(htmltext);
$("#sectionwebStory").css("display", "block");
}
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
}
});
}
// Code to Bind Lates Update data
function BindLatestUpdates() {
$("#ulLiveUpdates").html("");
$.ajax({
url: urlLiveUpdates,
type: 'GET',
dataType: 'json',
crossDomain: true,
async: false,
success: function (data, textStatus, xhr) {
if (data !== "") {
var result = jQuery.parseJSON(data);
if (result !== null && result.length > 0) {
var htmltext = "";
for (var i = 0; i < result.length; i++) {
if (i === 0) {
$("#achBrakingNews").text(result[i].Story);
$("#achBrakingNews").attr("title", result[i].Story);
$("#divBreakingNews").css("display", "block");
}
htmltext += '
';
htmltext += ' ';
htmltext += ' ';
htmltext += '
' + result[i].StoryDate + '
';
htmltext += '
' + result[i].Story + '
';
htmltext += '
';
htmltext += ' ';
htmltext += ' ';
}
$("#ulLiveUpdates").html(htmltext);
//$("#live-update-time").html(result[0].StoryDate);
//$("#live-update-txt").html(result[0].Story);
// $("#achBrakingNews").text(result[0].Story);
// $("#achBrakingNews").attr("title", result[0].Story);
//$("#divBreakingNews").css("display", "block");
//$("#live-update-time1").html(result[1].StoryDate);
//$("#live-update-txt1").html(result[1].Story);
//$("#live-update-time2").html(result[2].StoryDate);
//$("#live-update-txt2").html(result[2].Story);
//$("#live-update-time3").html(result[2].StoryDate);
//$("#live-update-txt3").html(result[2].Story);
//$("#live-update-time4").html(result[4].StoryDate);
//$("#live-update-txt4").html(result[4].Story);
//$("#live-update-time5").html(result[5].StoryDate);
//$("#live-update-txt5").html(result[5].Story);
// $(".live-update-wrap").css("display", "block");
//}
}
}
},
error: function (xhr, textStatus, errorThrown) {
console.log(errorThrown);
}
});
}
function HideBreakingNewsSection() {
$("#divBreakingNews").css("display", "none");
}