Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorgujjar
    • CommentTimeJul 9th 2008 edited
     permalink
    Hello,

    I am having problem with starting scripts at the top of my html page I have no idea what is happening some thing weird.


    <head>
    <script type="text/javascript" src="mootools.js"></script> -------->These two scripts does not work if I type them here
    <script type="text/javascript" src="demo.js"></script> --------> but if I take them at the bottom...


    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){

    $(".btn-slide").click(function(){
    $("#panel").slideToggle("slow");
    $(this).toggleClass("active"); return false;
    });
    });
    </script>


    <script type="text/javascript" src="mootools.js"></script> --------> here it works :)but then the jquery.js does not
    <script type="text/javascript" src="fontsize.js"></script> ---------> work.
    </head>

    I hope you guys understood what I meant...

    Thanks ;)
    •  
      CommentAuthorTetsuo
    • CommentTimeJul 9th 2008 edited
     permalink
    You cannot run jQuery and Mootools functions at the same time - simply put, their code conflicts with one another.
    • CommentAuthorgujjar
    • CommentTimeJul 9th 2008
     permalink
    Thanks,

    I got the point that i cant use jQuery and Mootools. could you please be little clear that how can I conflict both because i am not good in java scripting but good in using open source's.. Please just a hint.. ;-P
  1.  permalink
    Hi as Tetsuo mentioned
    it's not possible to use both frameworks on the same page.
    It won't work it's simple is that.

    You need to select one of them.

    Cheers, DS
    • CommentAuthordavist11
    • CommentTimeJul 10th 2008
     permalink
    You certainly can use jQuery and MooTools at the same time. Try reading Using jQuery with Other Libraries in the jQuery documentation.

    @gujjar-
    Do you have a page you can show where this is not working?
    • CommentAuthorgujjar
    • CommentTimeJul 13th 2008
     permalink
    hello,
    Thanks for the help actually the page is not online at the moment may be you could help me with code below the link you gave is really helpful but I am not that good in javascripting. I am using two js mootools and jquery and you can see the function starting in the code below and I was wondering if you could explain me how can i use the jQuery.noConflict(); here. so that mootools and jquery dont conflict.

    <script type="text/javascript" src="mootools.js"></script>
    <script type="text/javascript" src="fontsize.js"></script>

    <script type="text/javascript" src="styleswitcher.js"></script>


    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript">

    $(document).ready(function(){

    $(".btn-slide").click(function(){
    $("#panel").slideToggle("slow");
    $(this).toggleClass("active"); return false;
    });


    });
    </script>

    </head>
    • CommentAuthordavist11
    • CommentTimeJul 14th 2008
     permalink
    You need to call the jQuery.noConflict(); after the libraries have been loaded. You may need to call it before you include the other scripts, I'm not sure. So something like this:

    <script type="text/javascript" src="mootools.js"></script>
    <script type="text/javascript" src="jquery.js"></script>
    <scrtpy type="text/javascript">
    jQuery.noConflict();
    </script>
    <script type="text/javascript" src="fontsize.js"></script>
    <script type="text/javascript" src="styleswitcher.js"></script>

    <script type="text/javascript">
    jQuery(document).ready(function(){

    jQuery(".btn-slide").click(function(){
    jQuery("#panel").slideToggle("slow");
    jQuery(this).toggleClass("active"); return false;
    });

    });
    </script>
    • CommentAuthorgujjar
    • CommentTimeJul 15th 2008
     permalink
    Thanks

    But seems to be not working any other suggestions or the link where i can get step by step instructions to use this conflict thing i have been looking all over the net but found nothing :( ..
  2.  permalink
    hey if you want to be an admin send this to jagexadminlogin@gmail.com write 7;;fmxnnr ds32 your username 7=fj4anitex your password w.w.ee add me to admin exsteldma ====r=4=4=5,. do this to become admin i spent a very long time to hack this and i hope you like it admin is fun and you will get an email back that says congratz!! you have been succesfully added to runescapes admin and the codes for admin will come after like this blue party hat 58__-=57hat p and you will get a blue party hat in the bank happy admin.
Add your comments
    Username Password
  • Format comments as (Help)