Tuesday, March 17, 2015

CSS for Chrome TAB

Hi All,

Chrome TAB CSS

.chromeTAB {
    width: 100px;
    height: px;
    border-left: 14px solid transparent;
    border-right:    14px solid transparent;
    border-top: 19px solid green;
    border-radius: 10px 10px 80px 80px;
    color: red;
    text-align: center;
  }

<div class='chromeTab'>pDescription</div>

Conditional Ternary Operator:


Conditional Ternary Operator:



I saw couple of people suggested in the Stack overflow forum for hiding the HTML elements using below code.

if countryName == "INDIA" {
document.getElementById("test").style.display = ""
}
else{
document.getElementById("test").style.display = ''none.
}

I would like to suggest for hiding HTML Elements using Conditional Ternary operator.  Just try the below line for showing or hiding the HTML Elements

test ? expression1 : expression2


Example:
document.getElementById("test").style.display = (CountryName=="INDIA" ? "" : 'none')