View Single Post
Old 02-12-2010, 10:26 AM   PM User | #1
Liani
New to the CF scene

 
Join Date: Feb 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Liani is an unknown quantity at this point
how to open independently 2 buttons with slide effect (solved)

hi

first of all i wanted to say that i have no idea of coding with any language, and that the code that i use was found from searching. i needed for my blog a hidden-toggle-slide effect for my text.

i was trying to copy-paste from tutorials the code but most times that didnt work, when i found the code i was looking for i tested it and found this problem.

when you post 1 button it works fine, but when you post 2 it has the problem that it opens both of the hidden text (sorry about talking this much but it's the first time i am asking for help in this forum, and i am not sure how to explain my problem).

this is the code that i am using
Code:
<!doctype html>


  <style>
  p { width:400px; 
display:none; }
  </style>
  <script src="/scripts/jquery-1.4.js"></script>


	<button>Toggle</button>

  <p>
    This is the paragraph to end all paragraphs.  You
    should feel <em>lucky</em> to have seen such a paragraph in
    your life.  Congratulations!
  </p>
<script>
    $("button").click(function () {
      $("p").slideToggle("slow");
    });
</script>

</!doctype>
also this is my test blog so you could see the problem i am talking about http://qweje.blogspot.com/

and if there are any questions please ask them i ll help as much i can thank you in advance

(if i posted it in the wrong place i apologise)

Last edited by Liani; 02-14-2010 at 08:29 AM..
Liani is offline   Reply With Quote