473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Link to a page and open a toggle on the page with one link

I would like to have a link on my home page that links to a services page and opens a toggle on that page about a particular service. The toggles by default will all be closed when only the page is linked to. There will be 8 toggles on the service page but I only want one open based on the link that was used on the home page.

On my home page I have:
Expand|Select|Wrap|Line Numbers
  1.    <a href="http://www.debdweb.com/test/services/?id=#Service1">Go to Service 1 (open)</a>
  2.  
  3. On the services page:
  4.  
  5.    <div class="service-box">
  6.  
  7.         <ul class="service_list">
  8.  
  9.  
  10.         <li>
  11.             <h6><a href="#Service1" class="toggle-link tog1">Service 1</a></h6>
  12.             <div class="sub-text" id="Service1">
  13.                 Curabitur faucibus magna at leo commodo sed cursus dui posuere.Praesent ornare,<br />
  14. leo et aliquet tempus, orci orci luctus leo. Quisque….
  15.             </div>
  16.         </li>
  17.                 </ul>
  18.    </div>
The above does not open the toggle. Do I need a php function to do this? Any help would be greatly appreciated.

Thanks!
Sep 9 '12 #1
3 2227
Rabbit
12,516 Expert Mod 8TB
I have no idea what you mean by toggle. Toggle is not a standard HTML element so unless you explain what you mean by it, I can't understand what you're trying to do.
Sep 9 '12 #2
I have seem then called collapsible toggles or spoilers. They are basically an accordion but you can have multiple open at the same time. Here is a link to the service page I am playing around with that contains 4 toggles: http://www.debdweb.com/test/services. Here is a link to another site where I used toggles/spoilers: http://www.thedienerschool.org/community. Please let me know if you need more info. WP UI is a wordpress plugin that provides these functions and they also came with this theme I am working with in the test location. Thanks!
Sep 10 '12 #3
Rabbit
12,516 Expert Mod 8TB
You wouldn't use a PHP function per se. You would just use PHP to add an additional class based on the id that was passed.
Sep 10 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Eric W. Holzapfel | last post by:
Hello PHPers, I have just installed RH Linux ES 3.0 (basic) kernel 2.4.21-9.EL, i686, Apache 2.0.X, and php 4.2.X. I have made no changes to the php.ini. I am trying to use the following page...
4
by: crhaynes | last post by:
I'm having trouble with my CSS. My links are black, my hover is orange and my active link is red. When I select a link it turns red but i does not retain that color when the selected page loads. ...
1
by: Wilton Yuan | last post by:
Hello, I am new of ASP.NET, I am trying to develop a web application with ASP.NET and Microsoft Visual Studio .net 2002. I create only one simple page with simple C# code behind, it works fine in...
5
by: Kojak | last post by:
I have a own search engine in a intranet. It can be opened by the search button or with the target="_search". On the page is a Textbox and a button. The page works well, but just opens in the...
4
by: Corno | last post by:
Hi all, How do I find out if the current visitor of my page has enough rights to open another page on the same server? I need this to show a link to that page only when the visitor can actually...
33
by: STILL LEARNING | last post by:
I'm not sure if this can even be done, but what prompts the question is my desire to be able to create an "Uber Link" script/code of some sort, such that even if the html page contains nothing but...
0
by: GS | last post by:
I was using webbrowser to display a secured page. That page is on a site requiring pre- login.= with user and password. When a particular link is clicked, new instance of explorer is opened. ...
7
by: chambers.anya | last post by:
Hi, I've just been scouring the web trying to find an answer for how to do this but so far without any success. Basically I want some of the links in my page to open in new tabs (I'm using...
5
by: Murray | last post by:
Forgive me if this question is too basic, but I'm new to ASP.NET programming, and I can't locate a simple answer to this question. I have a web page that consists of a Master Page and a single...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.