Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts

    jquery toggle function not working

    First I am new at jquery - I like it - but do not understand it really well

    http://www.countyfairgrounds.net/tes...gn/testsix.php

    I am using
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script src="/js/bootstrap-modal.js"></script>

    I am "trying" to do a mouseover with a drop down and up jquery feature in the center of the page above the brow welcome box on the left column - and across the center of the page to the right

    I am new at this.
    What I am trying to do is this
    http://www.w3schools.com/jquery/tryi...y_slide_toggle

    AND no it does not work and I cannot figure out why - I have this script in my body tag at the top of the page

    <script>
    $(document).ready(function(){
    $("#first").mouseover(function(){
    $("#second").slideToggle("slow");
    });
    });
    </script>

  • #2
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    What (if any) error messages are in the error console?
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #3
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,969
    Thanks
    56
    Thanked 557 Times in 554 Posts
    I would try moving these:
    Code:
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script src="/js/bootstrap-modal.js"></script>
    into the head section

  • #4
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    Yeah, that'll do it. Can't reference jQuery if it isn't loaded, yet.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #5
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,343
    Thanks
    11
    Thanked 589 Times in 570 Posts
    Quote Originally Posted by xelawho View Post
    I would try moving these:
    Code:
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script src="/js/bootstrap-modal.js"></script>
    into the head section
    that's a terrible idea for anyone concerned about thier site visitors staring at a blank screen while off-site DNS looks up the CDN and eventually returns the whole script body.

    It's almost-always a lot better to let visitors stare at CSS-styled HTML while they wait for JS to load.

    Why wait on scripts if you don't have to?

    As long as the first two external tags are before the third inline tag, everything will work fine.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • #6
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,969
    Thanks
    56
    Thanked 557 Times in 554 Posts
    Quote Originally Posted by rnd me View Post
    As long as the first two external tags are before the third inline tag, everything will work fine.
    yes, of course you're right - silly me


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •