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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts

    javascript and toggle bootstrap

    First, I am new at jquery and javascript, I do know html5 and css3 -
    here is the link
    http://www.countyfairgrounds.net/tes...stevents1.html
    now someone is working with me on the blue link problem in the content section -BUT, I really have a javascript and jquery issue here to finish this page. First - the first toggle works great and is not an issue. The code is at the bottom of the page. I am however trying to put a toggle on all our events and right now they are opening the top toggle box - the javascript for them is at the top of the page. The first event toggle california, san jose has different code then the one below it , the first one is linked to the javascript at the top of the page and is opening the toggle above it. !! Help please. It has to be something simple I am missing.

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    There are a number of errors shown in your browser's console - attached. Learning to work with the console is an essential skill when working with JS.

    Most importantly, you are not loading the jQuery library before you attempt to use it, so $ is undefined.
    Attached Thumbnails Attached Thumbnails javascript and toggle bootstrap-cons1.png  
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #3
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    as I stated - I am new at this - I am making progress and watching javascript course and jquery videos daily. However, I really really need this to work. The county fair season is fast approaching and I really need it on our website. Can you please please help me ?? first I am aware of JS Fiddle and am still trying to figure out how to use it. I simply do not know where you got that error report attached to your response. I am uncomfortable with Firefox and try to use the google inspect element - I see where you got "I think" the report you attached. I moved the jquery.js file to the top of the page (although the jquery course I am taking from TheNewBoston says to put in on the bottom of the html5 page above the </body> tag) and am attaching a report from the same place in chrome you did . I see I believe some problems with the iframe youtube video - and am not concerned about that right now I really really need to get the toggle in the events section to work. Please help me.
    Code:
    <div id="topmenu">
    
    /*code by top toggle button*/
      <button class="btn-danger"      style="float:right;margin-right:20px;margin-bottom:5px;" data-rel="type-fade"  onclick="toggle('type-fade');" >Toggle Selections</button>
    
    </div> /*closes top menu part with button that shows on page*/
    
    
    
    /*dropdown of top menu*/
    
    <div id="type-fade" class="toggle-me hidden" style="displaynone;" >
    
    <div id="menu">
    has form
    </div>
    
    </div>
    
    _________________________________
    event toggle center right bottom
    
    <div id="content">
    <div>
    <section class="menucontent">
    </section>
    </div>
    
    <div id="type-fade" class="toggle-me hidden" style="display:none;" >
    
    </div>
    
    </div> /*closes content section*/


  •  

    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
    •