Q:

how to get the current year in dropdown

Fiddle
http://jsfiddle.net/t8fdh/100/
i have dropdown containing years, i need to get the current year in drop down.
   <select name="one" class="dropdown-select select1">
    <option value="-1">Select Year</option>
    <option value="2014">2014</option>
    <option value="2013">2013</option>
    <option value="2012">2012</option>
    </select>   

Javascript
var d = new Date(),
year = d.getFullYear();

i tried below code but both are not working
$('.select1 option:eq('+year +')').prop('selected', true);

or
$('.select1 option[value="'+year +'"]').prop('selected', true);

A:

it should be:
$('.select1 option[value='+year +']').attr('selected',true);

JSFIDDLE

