Skip to content

Commit

Permalink
Update autocomplete.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
newgene committed Apr 20, 2020
1 parent 826baf9 commit 706dfe7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/doc/autocomplete.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Try it live first
<div style=' text-align:center'>
<label for="gene_query">Enter a gene here (e.g., CDK2): </label>
<input style="width:250px" class="mygene_query_target">
<script src="http://mygene.info/widget/autocomplete/js/mygene_query_min.js" type="text/javascript"></script>
<script src="//mygene.info/widget/autocomplete/js/mygene_query_min.js" type="text/javascript"></script>
</div>

About this widget
Expand All @@ -32,7 +32,7 @@ To use this widget in your own website is very easy, just following these three

1. Copy/paste this line into your html file::

<script src="http://mygene.info/widget/autocomplete/js/mygene_query_min.js" type="text/javascript"></script>
<script src="//mygene.info/widget/autocomplete/js/mygene_query_min.js" type="text/javascript"></script>


.. Hint:: if you prefer an un-minified javascript file, using "mygene_query.js" instead.
Expand Down Expand Up @@ -61,15 +61,15 @@ As shown in above example, you can access the gene object as **ui.item**::

.. Note:: if you don't define your own callback function (like the minimal HTML page below), the default behavior is to display an alert msg with the gene selected. To change this default behavior, you must overwrite with your own callback function (keep the same name as "**mygene_query_select_callback**").

A minimal HTML page with autocomplete enabled looks just like this (`See it in action here <http://mygene.info/widget/autocomplete/demo_minimal.html>`_):
A minimal HTML page with autocomplete enabled looks just like this (`See it in action here <//mygene.info/widget/autocomplete/demo_minimal.html>`_):

.. code-block:: html

<html>
<body>
<label for="gene_query">Enter a gene here: </label>
<input style="width:250px" class="mygene_query_target">
<script src="http://mygene.info/widget/autocomplete/js/mygene_query_min.js" type="text/javascript"></script>
<script src="//mygene.info/widget/autocomplete/js/mygene_query_min.js" type="text/javascript"></script>
</body>
</html>

Expand Down

0 comments on commit 706dfe7

Please sign in to comment.