Jump to content

joetaylor

Members
  • Posts

    11
  • Joined

  • Last visited

joetaylor's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Wow, thanks a million! I was hoping there was a simple and elegant way to accomplish this. I can't wait until 'what my mind envisions' and 'my coding abilities' meet someday. I had a hunch if statement/then/else probably was the answer combined with manipulating classes, but my brain wasn't connecting the coding dots yet. unrelated note... I can't wait until I can give back more to this community; you've all been great so far.. I've been lurking in the other forum areas that I have more experience with waiting for an opportunity to help and give back; I'll spend some of the time I would have been figuring this problem out today at phpfreaks! ty all!
  2. Thanks, makes sense. I was playing around with it a lot today and I noticed that or similar worked. But I have to figure out how to code it so I can still have the button text toggle back and forth.. and have just the one button/ link. It's easy peezy to have two buttons. I've been scouring the net for hours and hours today testing a myriad of avenues.. been thinking there's GOT to be a jquery plugin that will do something as simple as this, but I'm not having a lot of luck - found a couple, but they are either too complicated or don't work for some reason. I'm trying to code it myself from scratch (or adding to what I have there) thinking that I would use an if/then type statement.. I would assume that would work. Learning a lot, but still not there..
  3. ok, to set this up.. This is a page with about 50 paragraphs.. I essentially have two scripts on this page. One to open those paragraphs one by one. And another to open and close all of them. My problem is when I've opened a one or more paragraphs and decide to then click the link that opens all, ... it actually closes the 'open paragraphs' and opens the rest. Is there something I can add to this code that would force all to open or close instead of just toggling each individually? // FAQ hide show ALL $(document).ready(function() { $('.nav-toggle').click(function(){ var collapse_content_selector = $(this).attr('href'); var toggle_switch = $(this); $(collapse_content_selector).slideToggle('150', function(){ if($(this).css('display')=='none'){ toggle_switch.html('[x] expand all'); }else{ toggle_switch.html('[x] hide all'); } }); }); }); My HTML <button href=".slideall" class="nav-toggle">[x] expand all</button> Then of course each paragraph is assigned that class (.slideall).. Thanks for your input in advance! ~Joe
  4. And... my last update. If I actually used IE myself, I might have thought not to ignore the box at the bottom that told me it was blocking the script. It's working now that I unblocked it... Thanks again for your help!
  5. I hate to keep updating my thread.. sorry. But I just wanted to update it. I actually figured out how to accomplish everything I needed. I'm using a variety of different things to accomplish my end. And everything was working perfect in all the major browsers accept... IE. In fact, I went back to the original code Xaotique posted and it doesn't work either. I tried to rule everything out including trying this on a different computer and nothing seems to work. Does anyone know of any known bugs with IE and this code or why this would happen? I can paste my exact code it needed.. Thanks a ton in advance! (going back to banging my head against the wall )
  6. If this helps.. codes a bit messy as I've been messing around trying to figure this out... <input type="submit" src="images/circle.png" class="change" rel="investors" value="For Investors" /> <input type="submit" src="images/circle.png" class="change" rel="companies" value="For Companies" /> <!-- starts FOR INVESTORS --> <div class="content" id="investors"> <ul> <li><input type="submit" class="change2" rel="investors1" value="Investors 1" /></li> <li><input type="submit" class="change2" rel="investors2" value="Investors 2" /></li> <li><input type="submit" class="change2" rel="investors3" value="Investors 3" /></li> <li><input type="submit" class="change2" rel="investors4" value="Investors 4" /></li> <li><input type="submit" class="change2" rel="investors5" value="Investors 5" /></li> </ul> <div class="content2" id="investors1"><h2>Step #1: TITLE</h2> <ul> <li><h3>HEADING</h3> CONTENT</li> <li><h3>HEADING</h3> CONTENT</li> <li><h3>HEADING</h3> CONTENT</li> </ul> </div> <div class="content2" id="investors2"><h2>Step #2: TITLE</h2></div> <div class="content2" id="investors3"><h2>Step #3: TITLE</h2></div> <div class="content2" id="investors4"><h2>Step #4: TITLE</h2></div> <div class="content2" id="investors5"><h2>Step #5: TITLE</h2></div> And the javascript... pretty much following the above.. // JavaScript Document // Allow the page to load $(document).ready(function() { // Wait for a button to be clicked $(".change").click(function() { // We're gonna use the value of the rel attribute for the ID var item = $(this).attr("rel"); // Hide all of our DIVs and show the one we want. $(".content").hide(); $("#" + item).show(); }); }); // Allow the page to load $(document).ready(function() { // Wait for a button to be clicked $(".change2").click(function() { // We're gonna use the value of the rel attribute for the ID var item = $(this).attr("rel"); // Hide all of our DIVs and show the one we want. $(".content2").hide(); $("#" + item).show(); }); });
  7. I've got this working really well. I worked out how to nest this and have background images in place of the buttons etc.. using css to create the hover effects over those images. But there's one thing for the life of me I can't figure out and I'm sure javascript/jquery is the answer.. there's probably just a line of code that I could add to what I have that would do it. How can I make the image change onclick and stay that way until something else is clicked? Closest I got was using CSS 'active' pseudo-class .. of course, my visitors would have to hold down their mouse button to keep it that way. lol
  8. didn't get around to working on this until today.. just wanted to pop in and say thanks for that!
  9. Hello, What would be the best way to accomplish what's being done on this page: https://www.seedinvest.com/about-us (specifically the 'how it works' section) Basically you click the various content/circles and it changes the content below it. I thought I might be able to do it with css, but maybe javascript or jquery would be better? Thoughts? Thanks, -Joe P.S. Note, I'm new to javascript/jquery.. but am learning.
  10. Correct. And.. I think you just gave me the one scenario I didn't try! It seems to work after a few tests. Thank you so much!
  11. Just thought I'd say hi.. You may be seeing a lot more of me in the future.. B) I'd been building websites for my search marketing efforts for over 10 years. I've ran a full-time online business for over 7 years. But, in the beginning, I was building sites for myself (affiliate marketing, digital products).. a couple of years ago I decided to start designing and building sites for others.. clients. I started out on the freelance sites like elance mainly to get business and experience.. I did ok, but it really just served as a stepping stone as my portfolio developed. This year things changed pretty dramatically. While I may seek some freelance work on those sites, I have built a couple of relationships/clients that refer me all the business I need. It's a great feeling, it's great to continue to work for myself.. and it's given me confidence that I'll be doing this for a long time to come! Most of my experience revolves around CMS.. at the moment, most of the sites I'm building with Wordpress. From mockup design, coding and developing the site on the web. I'm great with html and css.. I'm ok, I understand, php,..have a lot to learn. I couldn't code anything from scratch.. I also am trying to get better at javascript, mySQL as those are languages that play large rolls in the sites I'm building or I see myself building. Anyway, I don't want to write a book. I do know it's time for me to find a couple of good communities to contribute to and learn from.. and this one looks like one of the best. Looking forward to getting to know all of you. thanks! -Joe
  12. ok, after hours trying to figure this out myself, I thought it was about time I joined a php community anyway. I built a html web form. It uses a php script to check for required fields and send the e-mail if it passes. Just checking for a single field is filled, or not, is pretty straightforward and works like this.. if(empty($dob)) { $error_message .= 'Error: dob required'; } if(empty($dayphone)) { $error_message .= 'Error: day phone required'; } But I have a couple situations in the form where I need to only require another field if another field (or radio) is filled. There's a field for Mobile Phone. Under that I have two radio buttons that answer Allow Texts? yes/no <label for="mobphone"> Mobile Phone: </label> <input type="text" name="mobphone" id="fields"><br> </div> <div id="form-radio"> <label for="texts"> Allow Texts? </label> <input type="radio" name="texts" value="yes">Yes <input type="radio" name="texts" value="no">No </div> This was my best try... if(isset($mobphone) && empty($texts)) { $error_message .= 'Error: Allow Texts yes or no required'; } ... and now, you probably know my level of php experience. ..I'm learning. lol Am I on the right track? Is it possible to do this? a Better way? The other fields with the same scenario are similar,.. they aren't radio buttons. They are drop down or text fields. Thanks for any help in advance! ~Joe
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.