Jump to content

bottlez

Members
  • Posts

    5
  • Joined

  • Last visited

bottlez's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Wow you solved my problem!! That's amazing! Wp was automatically formatting it into paragraphs. Thanks stranger!
  2. Thanks so much for the suggestion but I'm getting the same error: (index):476 Uncaught TypeError: Cannot read property 'classList' of nullacc.(anonymous function).onclick @ (index):476 Could it possibly be that I don't have some header file included for javascript or something? W3 would have done that automatically.
  3. <div class="entry-content"> <p><button class="accordion">How do I make a decent website?</button></p> <div class="panel"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> </div> <p><button class="accordion">Why don’t pigs fly?</button></p> <div class="panel"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> </div> <p><button class="accordion">How will I ever leave this awesome place?</button></p> <div id="foo" class="panel"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> </div> </div> I took the html directly from the w3 just to test it and I'm still getting the same problem. Here is my html code.
  4. I'm building a simple according from a w3 guide and I can't seem to get it to work on my wordpress website. Guide: http://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_accordion_symbol I continue to get this error: (index):474 Uncaught TypeError: Cannot read property 'classList' of nullacc.(anonymous function).onclick @ (index):474 var acc = document.getElementsByClassName("accordion"); var i; for (i = 0; i < acc.length; i++) { acc[i].onclick = function () { this.classList.toggle("active"); this.nextElementSibling.classList.toggle("show"); } } I'm just learning javascript so I'm new to this but I can't see what is wrong with this code. Active works just fine but the stuff highlighted in red keeps giving me errors and nothing drops down.
  5. I am very new to coding and just created a website for a client at my work. The website is currently at www.dreamstreetstallions/index2.com but I would like www.dreamstreetstallions.com to link directly to that page. How do I prevent people who type in the regular domain from going into the ftp files? The FTP server has a file inside of it called dreamstreetstallions.com that I put the pages in.
×
×
  • Create New...