load js file in runtime checking whether it is not loaded

Asked
Viewd854

0

how it can be implemented that- load jquery file dynamically whether it is not loaded??? or if loaded then ignore further load.,.??

thanks

  • What did you do to make it work?

    Randell12 августа 2009, 08:03
  • for ajax load of html page in ui-tab!!!

    Nazmul Hasan04 августа 2009, 09:19
  • Why do you need this, by the way?

    Randell04 августа 2009, 07:45

2 ответов

0

Have a look at getScript. It will load a script file, and a callback function is run when the loading is done.

1
<script type="text/javascript">
if (typeof jQuery == 'undefined')
{
    document.write(unescape("%3Cscript src='/path/to/your/jquery' type='text/javascript'%3E%3C/script%3E"));
}
</script>
  • is it posible???

    Nazmul Hasan04 августа 2009, 07:07