Difference between revisions of "Template:Find a nation"

From NSWiki
Jump to: navigation, search
(Created page with "<onlyinclude>{| class="findanation" style="border-width: 0px; border-style: solid; border-radius: 3px; background-color:#white; box-shadow: 0px 2px 5px #999999; align:center; ...")
 
Line 1: Line 1:
<onlyinclude>{| class="findanation" style="border-width: 0px; border-style: solid; border-radius: 3px; background-color:#white; box-shadow: 0px 2px 5px #999999; align:center; width:150; text-align: center; padding: 3ex 3ex; margin: 3em 3; margin-bottom: 15px;"
+
<shtml version="2" keyname="jenlom" hash="7c752c2b9ee506fde71dc1a4e7b600c5b281195e2e1fb966ba323e5ea24395e7"><script>
| style="vertical-align: middle; font-size: small;" | <big>'''Find a nation'''</big>
+
function showDiv() {
|}</onlyinclude>
+
    if ($('#nation:hidden').length > 0) {
<noinclude>
+
        $('#nation').slideDown('medium');
 +
        $('#nationinput').focus();
 +
        $('#nationinput').select();
 +
  } else {
 +
        search();
 +
    }
 +
}
 +
function press(e) {
 +
    var evt = e || window.event
 +
    if (evt.keyCode === 13) {
 +
        search();
 +
    }
 +
}
 +
function search() {
 +
    window.location.href = "http://nswiki.org/index.php?search=Nation/" + $("#nationinput").val();
 +
}
 +
</script>
 +
<div style="border-width: 0px; border-style: solid; border-radius: 3px; background-color:#white; box-shadow: 0px 4px 10px #999999; align:center; width:33.33%; text-align: center; padding: 3ex 3ex; margin: 1em 1em 1em 1em; margin-bottom: 15px;"><div id="welcomeDiv"  style="display:none;" class="answer_list" > WELCOME</div>
 +
<input type="button" name="nation" value="Find a nation" onclick="showDiv()" /><div id="nation" style="display: none;"><input type="text" id= "nationinput" placeholder="Nation" style="border:0px solid; box-shadow: 0px 2px 10px #999999; margin-top: 10px; text-align: center; padding: 5px 5px;" onkeydown="return press( event );"></input></div></div></shtml>

Revision as of 17:59, 22 January 2014