Difference between revisions of "Template:Find an article"

From NSWiki
Jump to: navigation, search
(change text)
Line 1: Line 1:
<shtml version="2" keyname="jenlom" hash="00e42822d18f1a7ff3e3eb72e6fe517ac8900f79af6ba100566f809e2bb78921"><script>
+
<script>
 
function showDivArticle() {
 
function showDivArticle() {
 
     if ($('#article:hidden').length > 0) {
 
     if ($('#article:hidden').length > 0) {
Line 19: Line 19:
 
}
 
}
 
</script>
 
</script>
<div style="border-width: 0px; border-style: solid; border-radius: 3px; background-color:#white; box-shadow: 0px 4px 10px #999999; align:center; width:80%; text-align: center; padding: 3ex 3ex; margin-top: 1em; margin-bottom: 1em; margin-left: 1em; margin-right: 1em;"><div id="welcomeDiv"  style="display:none;" class="answer_list" > WELCOME</div>
+
<div style="border-width: 0px; border-style: solid; border-radius: 3px; background-color:#white; box-shadow: 0px 4px 10px #999999; align:center; width:80%; text-align: center; padding: 3ex 3ex; margin-top: 1em; margin-bottom: 1em; margin-left: 1em; margin-right: 1em;">
<input type="button" name="article" value="Find an article" onclick="showDivArticle()"  class="btn btn-default btn-lg btn-block"/><div id="article" style="display: none;"><input type="text" id= "articleinput" placeholder="article" style="width: 95%; border:0px solid;  border-radius: 3px; border:0px solid; box-shadow: 0px 2px 10px #999999; margin-top: 10px; text-align: center; padding: 5px 5px;" onkeydown="return pressArticle( event );"></input></div></div>
+
<input type="button" name="article" value="Search The Wiki" onclick="showDivArticle()"  class="btn btn-default btn-lg btn-block"/><div id="article" style="display: none;"><input type="text" id= "articleinput" placeholder="article" style="width: 95%; border:0px solid;  border-radius: 3px; border:0px solid; box-shadow: 0px 2px 10px #999999; margin-top: 10px; text-align: center; padding: 5px 5px;" onkeydown="return pressArticle( event );"></input></div></div>
</shtml>
+

Revision as of 21:55, 22 January 2014

<script> function showDivArticle() {

   if ($('#article:hidden').length > 0) {
       $('#article').slideDown('medium'); 
       $('#articleinput').focus();
       $('#articleinput').select();
  } else {
       searchArticle();
   }

} function pressArticle(e) {

   var evt = e || window.event
   if (evt.keyCode === 13) {
       searchArticle();
   }

} function searchArticle() {

   window.location.href = "http://nswiki.org/index.php?search=" + $("#articleinput").val();

} </script>

<input type="button" name="article" value="Search The Wiki" onclick="showDivArticle()" class="btn btn-default btn-lg btn-block"/>