javascript - HTML IF statements in JS -


i have js code:

$(function() {     $('.animate_hovercard').tooltipster({         interactive: true,         content: 'loading...',         contentcloning: false,         contentashtml: true,         animation: 'fade',         functionbefore: function(origin, continuetooltip) {             // we'll make function asynchronous , allow tooltip go ahead , show loading notification while fetching our data.             continuetooltip();             origin.tooltipster('content', '<div class="hovercard"> <div> <div class="display-pic"> <div class="cover-photo"> <div class="display-pic-gradient"></div><img src="dp.jpg"> </div><div class="profile-pic"> <div class="pic"> <img src="avatar.jpg" title="profile image"> </div><div class="details"> <ul class="details-list"> <li class="details-list-item"> <p> <span class="glyph glyph-home"></span> <span> lives in <a href="#">chennai</a> <a href="#">tamilnadu</a></span> </p></li><li class="details-list-item"> <p> <span class="glyph glyph-work"></span> <span> founder @ <a href="#">codedodle</a></span> </p></li></ul> </div></div></div><div class="display-pic-gradient"></div><div class="title-container"> <a class="title" href="#" title="visit page">tamil selvan</a> <p class="other-info">2 followers</p></div><div class="info"> <div class="info-inner"> <div class="interactions"> <a href="#" class="btn">add friend</a> <a href="#" class="btn">follow</a> </div></div></div></div></div>');         }     }); }); 

i want know how add html if statements <!-- if -->(my code)<!-- else --> &nbsp; <!-- endif -->

is possible?

html doesn't have if else statements php or other programming languages. although, can use if else statements in javascript perform tasks.

if (hour < 18) {     greeting = "good day"; } else {     greeting = "good evening"; } 

here great resource learn more if else statements more indepth. http://www.w3schools.com/js/js_if_else.asp


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -