javascript - jQuery check if two values is blank -



javascript - jQuery check if two values is blank -

i have 3 values:

var tbb = $("#total1 span").text(); var tmb = $("#total2 span").text(); var tab = $("#total3 span").text();

each of them blank.

what improve way in javascript/jquery check if 2 of these values blank?

update

here mean, bit ugly , "lot of lines" solution

var = 0; if (tab != "") { i++; } if (tmb != "") { i++; } if (tbb != "") { i++; } if (i >= 2) { //do }

any improve thoughts?

if(tbb == null || tbb == ''){...}

and same rest.

javascript jquery

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -