Custom sport selector and input

This commit is contained in:
Brian Miyaji
2014-02-15 23:47:41 +11:00
parent 85b2cb380d
commit e800084fc4
2 changed files with 14 additions and 2 deletions

View File

@@ -1,5 +1,13 @@
jQuery(document).ready(function($){
$("body.settings_page_sportspress #sportspress_sport").change(function() {
$target = $("#sportspress_custom_sport_name");
if ( $(this).val() == "custom" )
$target.show();
else
$target.hide();
});
// Auto key placeholder
$("#poststuff #title").on("keyup", function() {
$("#sp_key").attr("placeholder", $(this).val().replace(/[^a-z]/gi,"").toLowerCase());