JavaScript and JQuery does not works in eclipse android emulator
<pre><code>&lt;html&gt;
&lt;head&gt;&lt;title&gt;ABC&lt;/title&gt;
&lt;!--&lt;script src="jquery.gamequery-0.7.0.js"&gt;&lt;/script&gt;--&gt;
&lt;!--&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;--&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;style&gt;
#abc{
    height:200px;
    width:200px;
    left: 400px;
    background: darkblue;
    position: absolute;

}
#def{
    left:  25%;
    top: 25%;
    position: absolute;
}
#ball{
    position: absolute; 
    top: 100px; 
    left: 180px;  
    line-height: 80px;
    opacity: 0;
}    

&lt;/style&gt;
&lt;script&gt; 
document.addEventListener("deviceready", onDeviceReady, true); 
function onDeviceReady(){
    //set the opacity of #abc to 0(Fade)
    $("#abc").css('opacity', 0)
  //Effect Function 

  //Create fade out effect for #abc
    $("#abc").animate({ 
      top: '200px',
      opacity:'1'

    });

    //Enlarge of #def
    $("#def").animate({ 
        height: '75px',
        width: '75px'
    });

    //Blink effect for #abc
    $("#abc").effect("pulsate", { times:3 }, 100);

    //Shake effect for #def
    $( "#def" ).effect( "shake" ,{ times:3 }, 50);

    //#ball turn orbit around #abc
    var angle = 0;     // starting position (degrees)
    var distance = 100; // distance of b from a
    var speed = 300;    // revolution speed in degrees per second
    var rate  = 10;    // refresh rate in ms

    function f() {

        var o = $('#def').offset();

        var t = o.top + (distance * Math.sin(angle * Math.PI/180.0));
        var l = o.left+ (distance * Math.cos(angle * Math.PI/180.0));

        $('#ball').css({
            top: t,
            left: l
        });
        angle += (speed * (rate/1000)) % 360;
     }
    setInterval(f, rate);
    //Let the #ball to appear
    $("#ball").css('opacity',1);

};

&lt;/script&gt; 
&lt;/head&gt;
&lt;body onload="onDeviceReady()"&gt;
&lt;button id="btnTry"&gt;Try Me&lt;/button&gt;
&lt;button id="btnReturn" onclick="window.location.reload();"&gt;Return To Normal&lt;/button&gt;
&lt;div id="abc"&gt;
&lt;img src="pix/Diamond%20Heart.gif" id="def" /&gt;
&lt;/div&gt;
&lt;img src="pix/Orange.gif" id="ball" /&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<hr>

<p>test.html</p>

<pre><code>public class BbbMainActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.bbb_main);
        WebView wv = (WebView) findViewById(R.id.webview);
        wv.getSettings().setJavaScriptEnabled(true);
        wv.loadUrl("file:///android_asset/test.html");
            }
</code></pre>

<h2>       }</h2>

<p>BbbMainActivity.java</p>

<pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    tools:context=".BbbMainActivity" &gt;

    &lt;TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="@string/hello_world" /&gt;
&lt;WebView  xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/webview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
/&gt;
</code></pre>

<h2>    </h2>

<p>bbb_main.xml</p>

<p>My problem with this code is that I can run the code properly in the web browser but when comes to the device emulator which I use eclipse (Android 2.1 &amp; Android 2.2) to run.</p>

<p>Can I know what mistake did I made ?</p>

<p>The code will show multiple effect. Feel free to copy it into notepad and save it as .html and run it.</p>

<p>Any help will be appreciate. Thanks in advanced for replying my post.
Thanks !</p>
