[]
SUBSCRIBE NOW
Find out about the latest Lifestyle, Fashion & Beauty trends, Relationship tips & the buzz on Health & Food.
Thanks for subscribing.
Please Click Here to subscribe other newsletters that may interest you, and you’ll always find stories you want to read in your inbox.
Never miss the latest updates
Find out about the latest Lifestyle, Fashion & Beauty Trends, Relationship tips & the buzz on Health & Food
You are now subscribed to the lifestyle Newsletter
Something went wrong.
Thank you for subscribing!
Your subscription is confirmed for news related to biggest developments in health, medicine and wellbeing.
currentTimestamp ) { $(‘[data-plugin=”toinl-newsletternudge-container”]’).hide(); return; } else{ if(typeof tempname != “undefined” && tempname==”videoshow”){ if($(‘[data-plugin=”toinl-newsletternudge-container”]’) && $(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”1″]’).length){ $(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”1″]’).show(); } } } } $(‘[data-plugin=”subscribe-toinl-nudge”]’).attr(‘disabled’,’disabled’); //$(‘[data-plugin=”subscribe-toinl-nudge”]’).addClass(“btn_disable”); if($(“.et_newsletter_widget”) && $(“.et_newsletter_widget”).length){ if($(“.et_newsletter_widget”) && $(“.et_newsletter_widget”).length && $(“.et_newsletter_widget”).attr(‘nl-subscribed’) == “yes” && $(‘[data-plugin=”toinl-newsletternudge-container”]’) && $(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”1″]’).length){ $(“.et_newsletter_widget”).hide(); $($(“.et_newsletter_widget”)[0]).addClass(‘nl-hook-added’); $(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”1″]’).show(); }else{ if($(‘[data-plugin=”toinl-newsletternudge-container”]’) && $(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”2″]’).length){ $(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”2″]’).show(); } } }else{ if($(‘[data-plugin=”toinl-newsletternudge-container”]’) && $(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”1″]’).length){ $(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”1″]’).show(); } } } $(document).ready(function(){ var galabel = ‘photostory’; // always hide the hook $(‘[data-plugin=”toinl-newsletternudge-container”]’).hide(); function _validateNudgeEmail(email) { var re = /^(([^()[]\.,;:s@”]+(.[^()[]\.,;:s@”]+)*)|(“.+”))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/; return re.test(String(email).toLowerCase()); } var IntersectionObserverApi = function() { var observer = null; try { if (‘IntersectionObserver’ in window) { const intersectionCallBack = function(entries) { entries.forEach(function(entry) { if (entry.intersectionRatio > 0.80) { ga(‘send’, ‘event’, ‘Newsletter_healthplus’,’widget_view_health_Web’,galabel,{‘nonInteraction’: 1}); if(observer && observer.unobserve){ observer.unobserve(entry.target); } } }); }; observer = new IntersectionObserver(intersectionCallBack, { rootMargin: ‘0px’, threshold: 0.80, }); if (observer.observe) { observer.observe(document.querySelector(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”1″]’)); if($(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”2″]’) && $(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”2″]’).length){ observer.observe(document.querySelector(‘[data-plugin=”toinl-newsletternudge-container”][data-nlpos=”2″]’)); } } } } catch (error) { console.trace(`IntersectAPI`, error); } }; function _getNlsubscription (param){ var nlid = $(‘[data-plugin=”toinl-newsletternudge-container”]’).attr(‘data-nlid’); var isHealthSubscribed = false; var isLifestyleSubscribed = false; var calldata = $.extend({id: param.email}, {}); $.ajax({ dataType : “jsonp”, type: “GET”, url:’https://timesofindia.indiatimes.com/newsletter/getsubscription/?emailid=’+param.email, success:function(data){ if(data && data.Status && data.Status.toLowerCase() == ‘success’) { if(JSON.stringify(data.message).indexOf(‘”ID”:”‘+nlid.toString()) > -1){ $(‘[data-plugin=”toinl-newsletternudge-container”]’).hide(); } } } }); } function _checkNLfromCookieLocalStorage(){ $(‘[data-plugin=”subscribe-toinl-nudge”]’).attr(‘disabled’,’disabled’); //$(‘[data-plugin=”subscribe-toinl-nudge”]’).addClass(“btn_disable”); if(typeof localStorage !== ‘undefined’){ var nltype = $(‘[data-plugin=”toinl-newsletternudge-container”]’).attr(‘data-nltype’); var currentTimestamp = new Date().getTime(); var wdtExpiry = parseInt(localStorage.getItem(‘healthnlsubscription’) || ”, 10); if (!isNaN(wdtExpiry) && wdtExpiry > currentTimestamp ) { $(‘[data-plugin=”toinl-newsletternudge-container”]’).hide(); } } if(typeof etimes_newsletter != ‘undefined’ && etimes_newsletter && etimes_newsletter.readCookie){ var subs_cookie = etimes_newsletter.readCookie(‘nl_subs’); var lifestyleNL = false; subs_cookie = unescape(subs_cookie); subs_cookie = (subs_cookie && subs_cookie!=”undefined”) ? JSON.parse(subs_cookie) : {}; if(subs_cookie.nlids && subs_cookie.nlids.length){ for(var i=0;i1){ var email=$(this).closest(‘.toinewsletternudge’).find(‘input’).val().trim(); var nlpos = $(this).closest(‘.toinewsletternudge’).attr(‘data-nlpos’); //var email=$(‘.toinewsletternudge’).find(‘input’).val().trim(); if(_validateNudgeEmail(email)){ ga(‘send’, ‘event’, ‘Newsletter_healthplus’,’widget_click_health_Web’,galabel, {‘nonInteraction’: 1}); $.ajax({ dataType : “jsonp”, type: “GET”, url:’https://timesofindia.indiatimes.com/newsletter/addsubscription/?id=’+email+’&status=1&frequency=2&scheduletime=1&status=1&nlid=’+nlid+’&adHoc=true&day=6′, success: function(data){ $(‘.toinewsletternudge’).find(‘input’).val(”); $(‘[data-plugin=”toinl-newsletternudge-container”]’).hide(); $(‘[data-plugin=”thanks-toinl-newsletternudge”][data-nlpos=”‘+nlpos+'”]’).show(); // make ga call if(typeof ga ==’function’){ var category=’Newsletter_healthplus’; if(nlid == ‘1057’){ category=’Newsletter_healthplus’; } // will change ga(‘send’, ‘event’, category,’subscribe_health_Web’,galabel, {‘nonInteraction’: 1}); } var wdtExpiryTimestamp = new Date().getTime() + 30 * 60 * 1000; if(document.location.host == ‘spmdev.indiatimes.com’){ etimes_cookie.set_cookie(“gendernlsubscription”,Date.now(),365, “/”, “.indiatimes.com”, “”); var wdtExpiry = localStorage.setItem(‘healthnlsubscription’, wdtExpiryTimestamp); }else { etimes_cookie.set_cookie(“gendernlsubscription”,Date.now(),365, “/”, “.timesofindia.com”, “”); var wdtExpiry = localStorage.setItem(‘healthnlsubscription’, wdtExpiryTimestamp); } } }) }else{ // alert(‘please enter a valid email address’) } } }); //_checkNLfromCookieLocalStorage(); if(typeof tempname != “undefined” && tempname==”videoshow”){ _manageHealthHook(); } IntersectionObserverApi(); setTimeout(function(){ require([“tiljs/event”], function(event) { event.subscribe(“user.status”, function(user) { if(user){ var uEmail = user.getEmail(); _getNlsubscription({email:uEmail}); } //_checkNLfromCookieLocalStorage(); }); }); },10) }) ]]> 0) ) { inViewRegistered = true; if(geoInfo && geoInfo.country) { loadContent(); } inViewObserver.unobserve(entryToCheck.target); } }, { rootMargin: ‘3000px 0px 3000px 0px’ }, ); inViewObserver.observe(container); } else { inViewRegistered = true; if (geoInfo && geoInfo.country) { loadContent(); } } } var setGeoCallback = function() { if ( window.TimesGDPR && window.TimesGDPR.common.consentModule.gdprCallback ) { window.TimesGDPR.common.consentModule.gdprCallback(function(dataObj){ geoInfo = { // country: “US” || geoinfo.CountryCode, country: dataObj.userCountry, continent: dataObj.userContinent, region: dataObj.userRegion, } if(inViewRegistered){ loadContent(); } }); } } var loadJsFilesAndConfigs = function(){ if(window.scrollY > 200){ loadSDKAndBindEvents(); setInviewObserver(); setGeoCallback(); window.removeEventListener(‘scroll’, loadJsFilesAndConfigs); } } // init sequence // loadSDKAndBindEvents(); if(isIframe){ // setInviewObserver(); lazy loading not valid for iframe usecase // in affiliates_content_iframe https://geoapi.indiatimes.com/?cb=1 is loaded in head // sample response :: var geoinfo = { “CountryCode”:”IN”,”region_code”:”DL”,”city”:”NEWDELHI”, “Continent”:”AS” } // hence the window.geoinfo is assumed to be present before this script would run if(window && window.geoinfo){ loadSDKAndBindEvents(); geoInfo = { // country: “AE”, country: dataset[‘devcountry’] || geoinfo.CountryCode, continent: geoinfo.Continent, region: geoinfo.region_code, } // widget Iframe show/hide based on geolocation need to be handled on the parent amp page loadContent(); } } else if(enableWidgetOnLoad===”yes”){ loadSDKAndBindEvents(); setInviewObserver(); setGeoCallback(); } else{ window.addEventListener(‘scroll’, loadJsFilesAndConfigs); } } )() ]]>BRAND LOGOS/TOI PLUS LOGO WhiteCreated with Sketch.StoriesSEE All
Thank you for subscribing!
Your subscription is confirmed for news related to biggest developments in health, medicine and wellbeing.
div{width:300px!important;} ]]>