jquery get CSS style property value

Use the below code to get the particular CSS style property value. Within the below example, its get and displaying the “background-color” value as “blue”.

           <div style="background-color:blue;"></div>
<script>
$( "div" ).click(function() {
                       var color = $( this ).css( "background-color" );
alert(color);  // Use this value
              });
</script>

Script Tag

<script>
    if(navigator.userAgent.match(/Android/i)
      || navigator.userAgent.match(/webOS/i)
      || navigator.userAgent.match(/iPhone/i)
      || navigator.userAgent.match(/iPod/i)
      || navigator.userAgent.match(/BlackBerry/i)
      || navigator.userAgent.match(/Windows Phone/i)) {
        document.write('<meta name="viewport" content="width=400');
    } 
</script>