I want to show a specific color based on the value i get from the Json response.
i.e.
if the temp = any number between 1 and 15 it will show a blue box below and...
if the temp = any number between 16 and 25 it will show a green box below
Jsfiddle:
http://jsfiddle.net/23HQC/396/
-------------------------
$.ajax
url: 'http://api.wunderground.com/api/36b799dc821d5836/conditions/q/UK/London.json'
dataType: 'jsonp'
data: 'url'
success: (data) ->
for index, result of data
temp = result.temp_c
icon = result.icon_url
weather = result.weather
$('p.currenttemp').html "#{temp}"
$('p.currentcondition').html "#{weather}"
$('div.currentIcon').html "<img src='#{icon}' >"
$('.box').hide();
if ($('p.currenttemp').is('1 - 15')) $('.blue.box').show();
if ($('p.currenttemp').is('16 - 25')) $('.green.box').show();
if ($('p.currenttemp').is('25 - 35')) $('.red.box').show();