MediaWiki

Vani suggest.js: Difference between revisions

(New page: document.write('<script type="text/javascript" src="' + '/jquery/jquery-autocomplete/lib/jquery.bgiframe.min.js"></' + 'script>'); document.write('<script type="text/javascript" src="' +...)
 
No edit summary
 
(31 intermediate revisions by the same user not shown)
Line 1: Line 1:
// This Jquery code is used to give suggestions in the search box for words with diacritics.
// It uses jquery.autocomplete and all its dependencies to fetch suggestions from a php script in the server
// and show it in a suggest box as the visitor types.
document.write('<script type="text/javascript" src="'
document.write('<script type="text/javascript" src="'
  + '/jquery/jquery-autocomplete/lib/jquery.bgiframe.min.js"></' + 'script>');
+ 'http://vanipedia.org/w/index.php?title=MediaWiki:Jquery.bgiframe.min.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');
document.write('<script type="text/javascript" src="'
document.write('<script type="text/javascript" src="'
+ '/jquery/jquery-autocomplete/lib/jquery.dimensions.js"></' + 'script>');
+ 'http://vanipedia.org/w/index.php?title=MediaWiki:Jquery.dimensions.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');
document.write('<script type="text/javascript" src="'
document.write('<script type="text/javascript" src="'
  + '/jquery/jquery-autocomplete/jquery.autocomplete2.js"></' + 'script>');
+ 'http://vanipedia.org/w/index.php?title=MediaWiki:Jquery.autocomplete.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');
document.write('<script type="text/javascript" src="'
+ 'http://vanipedia.org/w/index.php?title=MediaWiki:Jquery.ajaxQueue.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');




document.write('<script type="text/javascript" src="'
document.write('<link rel="stylesheet" type="text/css" href="http://vanipedia.org/w/index.php?title=MediaWiki:jquery.autocomplete.css&action=raw&ctype=text/css" />');
+ '/jquery/jquery-autocomplete/lib/jquery.ajaxQueue.js"></' + 'script>');
 
document.write('<script type="text/javascript" src="'
+ '/jquery/jquery-autocomplete/lib/thickbox-compressed.js"></' + 'script>');


document.write('<link rel="stylesheet" type="text/css" href="/jquery/jquery-autocomplete/jquery.autocomplete.css" />');
document.write('<link rel="stylesheet" type="text/css" href="/jquery/jquery-autocomplete/lib/thickbox.css" />');


$('document').ready(function () {
$('document').ready(function () {
$("input#q").autocomplete("/dictionary.php", {
$("#google_search").autocomplete("/php_scripts/dictionary.php", {
       scroll: true,
        scroll: true,
      autofill: false,
       selectFirst: false,
      maxItemsToShow: 10,
      minChars: 2,
  multiple: true,
  multipleSeparator: ' '
    });
    $("#searchInput").autocomplete("/php_scripts/dictionary.php", {
        scroll: true,
       autofill: false,
       autofill: false,
       selectFirst: false,
       selectFirst: false,
      chacheLength: 45,
       maxItemsToShow: 10,
       maxItemsToShow: 10,
      max: 20,
       minChars: 2,
       minChars: 2,
  multiple: true,
  multipleSeparator: ' '
     });
     });
});
});

Latest revision as of 14:09, 22 June 2008

// This Jquery code is used to give suggestions in the search box for words with diacritics.
// It uses jquery.autocomplete and all its dependencies to fetch suggestions from a php script in the server
// and show it in a suggest box as the visitor types.

document.write('<script type="text/javascript" src="'
+ 'http://vanipedia.org/w/index.php?title=MediaWiki:Jquery.bgiframe.min.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');
document.write('<script type="text/javascript" src="'
+ 'http://vanipedia.org/w/index.php?title=MediaWiki:Jquery.dimensions.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');
document.write('<script type="text/javascript" src="'
+ 'http://vanipedia.org/w/index.php?title=MediaWiki:Jquery.autocomplete.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');
document.write('<script type="text/javascript" src="'
+ 'http://vanipedia.org/w/index.php?title=MediaWiki:Jquery.ajaxQueue.js'
+ '&action=raw&ctype=text/javascript"></' + 'script>');


document.write('<link rel="stylesheet" type="text/css" href="http://vanipedia.org/w/index.php?title=MediaWiki:jquery.autocomplete.css&action=raw&ctype=text/css" />');



$('document').ready(function () {
	$("#google_search").autocomplete("/php_scripts/dictionary.php", {
        scroll: true,
      autofill: false,
      selectFirst: false,
      maxItemsToShow: 10,
      minChars: 2,
	  multiple: true,
	  multipleSeparator: ' '
    });
    $("#searchInput").autocomplete("/php_scripts/dictionary.php", {
        scroll: true,
      autofill: false,
      selectFirst: false,
      maxItemsToShow: 10,
      minChars: 2,
	  multiple: true,
	  multipleSeparator: ' '
    });
});