I'm doing a page w/lots of divs that I set to visibile or hidden dynamically using getElementById.. the divs are all forms... sometimes elements in a hidden form show thru on a visible form.. how can I fix this..
I'm trying to get my form to show and hide various divs with radio buttons. There are multiple options in the second box of my example. When a user selects the first option, more input boxes come up. Perfect, that's what I want. However, if they decide they didn't mean to click that option and instead wanted another option, the original part that popped up doesn't disappear. I cannot figure out how to make this happen.
I'm trying to selectively hide and show divs based on what a user specifies using three select boxes in a form. I'm probably missing something obvious, but here's what I've got and it doesn't, work, they divs just stay hidden.
I created the request object (I am a relative novice at AJAX), had it grab a text file with the code to insert into my target div, in this case a div with id = "delegate3and4". Surprisingly however, it still reset the previous form fields to empty. Am I misunderstanding how AJAX is supposed to work? I figured that, because it does not refresh the page that this would not happen. In fact, to test this out, I created a simple page from scratch with just a single input field and then used AJAX to insert the file in a div after this field and it did not reset the previous input. So, I am totally confused about why this would be happening on my live page. The page is a php page as it submits the form to a php script for processing but I don't think this should make a difference.
I had one working but it was kinda janky because it was causing me to have two divs with the same ID on one page. No good.
Since I updated to wp2.8.3 prior to launch, it's not working. So I've decided to just try and do it right.
Here's a page: [URL]
So, what I want to happen: On page load, the first tab: "general" and it's corresponding div beneath should be showing. And the first image should be showing. The other content divs and images should be hidden. I've given the text content divs a dashed border to show their borders. When a visitor clicks "dine at home" the general div and image hide, the second content div shows, as does the second image (it's currently the identical image, but the client may change later.) Etc.
I'll be using this function on a few other pages as well.
I awhen it comes to "developing" jQuery but I am trying to do something that is seemingly something simple but I can't for the life of me, figure out the best way to do it.
Here, you'll see the area below the navigation that has five buttons which are supposed to help scroll between the five associated divs.All I want to do is hide the currently shown div and then slide in the div associated with the button clicked.http:[url].....Here is what the animation is SUPPOSED to look like but the problem is is that the correct one uses Prototype and I am trying to use only one library and jQuery is the most suitable because I use it for other effects in the site and jQuery and Prototype obviously don't mesh well.
Apologies if this question has been asked a million times. I am fairly new to this game, have got my head around html & css and now it's time to add a little interactivity... BUT i've hit my first brick wall. I am setting up a (big) panel of text which i wish to present in a more reasonable fashion by hiding the content and only showing the headers. Got the Hide:Show function working ok as shown below, but I am stuck on my next requirement...
Basically The hidden text will show and hide when told by clicking on the relevant header - but i wish to hide the text in a visible area when clicking on a new header.
I have 3 divs containing images floated next to each other and when clicked i want a new div to appear beneath these 3 images. Clicking on the first image i want a new div to appear beneath these 3 images. Clicking on the second image must hide all other divs and only show the content for that div.
I have a page I am working and I am having some trouble with: I need to show and hide areas based on a radio selection. I initally started using the show / hide feature in Jquery but the problem is the elements need to be removed but then put back if the user selects the radio buttonagain as it has form elements that have validaion on them. The validation is still trying to validate the form elements becuase they are still on the page but just not showing. This is the radio group the user makes the selection from:
I'm using a pretty simple submenu to try to hide the div sections I don't want, isolating the ones I do want to be the only ones visible. My code isn't the most concise when addressing this problem, but it looks like it should still work.
Make sure you use Firefox (because I'm still very early in development and I dislike IE) and use this link [URL]... to see for yourself: Observe that there are two videos and one graphic. Hover over "my work" and click graphic. Fine, right? Now click video.
The div sections are identical in naming conventions. Is it that the JS can't act fast enough? I thought I remedied that by calling isolateDiv() after I had hid all the unwanteds.
This is just a small portion of my code. The sections separate fine when you first click the video link.The problem is that after you select one section, and then decide to select another one, only the first post with that div id shows up. Try the link at the top and hover on the "my work" section to try.
If I don't use style="display:none" inside the divs, I see them both initially and I can hide/show each one depending on which link I press. But the thing is that I need both divs to be hidden in the first place, and when I click on ONE, to show TWO, when I click on TWO to hide ONE and show TWO etc. Each time 1 div should be visible, depending on which link we press. The other must disappear.
I want to display the div marked 'General overview' by default, and to hide all of the other divs (section1, section2, section3 and section4) but would like to swap out the 'general' div with the other divs as the corresponding links are moused over.
e.g. mousing over the Section 2 link will replace the 'general' div with the 'section2' div. On mousing out, it will revert back to the 'general' div. Mousing over the Section 4 link will replace the 'general' div with the 'section4' div. On mousing out, it will revert back to the 'general' div. Etc etc....
So, if the user were to select "Selection1" two divs should only be visible. The same will apply for others, if "selection4" is made then only one div would be visible.
The user will need to the option to reset and display all divs by using the "ShowAll" selector.
I ahve seen examples of this on the net however, they do not show all the divs in the first instance and they are donhe by ID and not class. I need to do it by class as I have some with the same name and they cannot change.
I have been using a jquery based plug-in, and what i would like to do is degrade it, so a non js enabled browser will hide the relevant div when js is not enabled, and show a different div with appropriate message content.i have followed a couple of tut's which do this on click, but i would like this to occur on page load.
Completely new to jQuery but I am trying to implement a few pieces on my new website. At the moment I have three images in a row and I want to be able to click on any one of the images and use jQuery to populate a hidden div below the three images that contains more info and slide it out using the fold animation. I'd also like it if when a second image was clicked it closed the currently open div and opened the new one. I've seen tutorials that open the divs but can't find one that closes them again on opening a new one.
Can anyone point me to a tutorial that does this or suggest how it could be done?
On the homepage of my site, I would like to have some nav links that toggle between a few divs that are below in the content The divs in the content should display one at a time. For example, if you click nav1, the user would see div1. If nav2 is then clicked, div1 would hide and div2 would display.
I have some code that will do this, but for some reason it is hiding any divs that are within the toggled div. I'm very basic with JS and could use some help here. Here is my code:
It works really well but I have other div I would also like to show/hide. Is it possible to have a variable in the function that I could pass the name of the div to show/hide.
I have a ul list that I am using for a navigation menu and I would like to be able to click on items in the list to show different div's. I assume this is possible, so could someone please give me an indication of how to do it as I have been trying for a few days now and no joy.
I'm trying to add the "you have unsaved changes" message to a form. I have it working in every browser except IE7 and IE8.I have set the onbeforeunload with using a global "goodExit" variable (that's supposed to help IE, and it did partially).The thing is, that I have multiple tabs on the page, so I only show part of the form at any given time. If they change a field on one tab, the top of the page shows a visual box of "unsaved data", so that as the users changes tabs the box at the top still shows.The problem is that, IE fires the onbeforeunload anytime someone clicks to change tabs. The only thing that happens when they click a tab is that I use jQuery to show/hide the DIVs appropriately.Why does IE fire onbeforeunload when changing the display of DIVs???!!!No other browser does this.The global "goodExit" variable meant to help IE, seems to work, except that goodExit is set to true if they change any field on a tab, so that then the next tab they switch to fires the event.