hoaihuong_8x
New Member
I am making a select box with all the fonts in google fonts API. I have referred this https://developers.google.com/webfonts/docs/developer_api link to learn more about API but till now i was not able to make it.I am adding this Fiddle which i made for this.HTML\[code\] <select id="styleFont"> <option value="http://stackoverflow.com/questions/13757196/0">Myraid Pro</option> <option value="http://stackoverflow.com/questions/13757196/1">Sans ref</option> <option value="http://stackoverflow.com/questions/13757196/2">Times New Roman</option> <option value="http://stackoverflow.com/questions/13757196/3"> Arial</option> </select> <br> <textarea id="custom_text"></textarea> \[/code\]CSS\[code\] #custom_text{ resize: none;}?\[/code\]Script\[code\] $("#styleFont").change(function () { var id =$('#styleFont option' + ':selected').text(); $("#custom_text").css('font-family',id); });?\[/code\]My API key is https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyB8Ua6XIfe-gqbkE8P3XL4spd0x8Ft7eWoHow can i link those fonts to my select box in the fiddle?