Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

javascript help

Featured Replies

Hey..

 

Im not that sure about javascript. but there is something i want to add to my site but there is no other way i can think of doing so without some complex CSS....

 

I want to have a button that you can click on and reveals a section of and at the same time pushes the section below down. Then when you click on the button below it that got moved down, the top section closes and this one opens and the same thing happens.

 

I am not sure what this is called or how to do it, i was just wondering if anyone did??

Sounds like you want an accordion script. Try the method linked to, and explained, in this post.

 

Rob

  • Author

Yes that is what i want... but i was wondering how you implement the JS, i kno you put it in the Head, but what script you put around it.. such as <content type or whtever... soz if i confuse anyone cheers....

No probs, glad to help. :)

  • Author

changed post while you where posting tht :S soz... read again.. pls see if you can help thanks

<script type="text/javascript">
Insert all the code here
</script>

 

That is the basic syntax for adding javascript code onto a page. You can find a better explanation at the w3schools page for the script tag.

  • Author

That will do fine thanks, that's all i needed to know... sorry for messing up my post.

  • Author

This is really annoying me... instead of one section being shown and the rest being hidden it is showing all the text that is in the sections so it is not really working... just displaying everything.... any idea of what i could be doing wrong, all help would be nice thanks..

If you give us a link to the page you have the script on, we'll be able to help you better :)

  • Author

Given up on that code, sorry for the hassle. decided to use a code from DHTML, i found it easier to put on the page.

 

Thanks anyway

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.