This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* create download link of latest release | |
use example) | |
GitHub_getLatestReleaseZipDownloadLink("username/reponame",function(link){ | |
$("a.downlink-latest-release").attr("href",link); | |
}); | |
*/ | |
function GitHub_getLatestReleaseDownload(repo,after){ | |
$.get('https://api.github.com/repos/'+repo+'/releases/latest', function (data) { | |
var link = "https://github.com/"+repo+"/archive/" + data.tag_name + ".zip"; | |
after(link); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$("select[data-value]").each(function(){ | |
if($(this).find("option[value='"+$(this).attr("data-value")+"']").length > 0){ | |
$(this).find("option[value='"+$(this).attr("data-value")+"']").attr('selected', 'selected');//셀렉트박스 | |
} | |
}); | |
}); |