top



So guys i have this

Code:
  <div id="clickme">
      Click here
    </div>
    <img id="book" src="http://i36.servimg.com/u/f36/11/96/49/61/erase10.png" alt="" width="100" height="123" />
 
 <script> $('#clickme').click(function() {
      $('#book').fadeIn('slow', function() {
        // Animation complete
      });
    });</script> 

 <style>
 
 #book{display:none;} </style> 
first i want to fade in but after i want to close it i tried something like this

Code:
 $('#clickme').click(function() {
  $('#book').hide('slow', function() {
    alert('Animation complete.');
  });
});
but don't works i don't understand how can i make 2 effect on a class or id ..:(

Code:
$('#book').fadeIn('normal');
$('#clickme').click(function() {
        $('#book').fadeOut('normal');
});

man i don't want the image or the content to appear , man i want to do the toglle effect with the fade ...
something like this i'm no to good at js

Code:
 <div id="clickme">
      Click here
    </div>
    <img id="book" src="book.png" alt="" width="100" height="123" />
    With the element initially hidden, we can show it slowly:
 <script>  $('#clickme').click(function() {
      $('#book').fadeIn('slow', function() {
      $('#clickme').click(function() {
        $('#book').hide('slow');
});
      });
    });</script>

 
 
<style> #book {display:none;} </style> 
if i click the image wiil appear ina fade and when i click will hide but if i do this twice the image or the content will hide automaticaly.. and if i put tjhe code in wiewtopic_body doesn't work ..

use fadeOut instead hide

ya man the same effect if i clik twice the content will hide automaticaly look here http://razvan-teste3.forumgratuit.ro/h7-normal and if i put the code on the template isn't working ..

o.O of course it will hide it when its shown.. what do you want.. explain again.

dude if i clik one time the content will show , if i clik again will hide , if i clik again it will show and hide have you understand

sorry if my english is bad ..

yes Unknown Data it was quite easy thx ! it works on a html page but on the template it won't work

If i'm not wrong templates have problems with some JavaScript tags

where in the templates u add it?

in wiewtopic_body !

try add it in the overall_header before the end of the head tag

no effect man i added this in overall_header

Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

<script>  $('#clickme').click(function() {
      $('#book').fadeToggle('slow', function() {
   
      });
    });</script> 
and this is wiewtopic_body
Code:

<div id="clickme">
      Click here
    </div>
    <img id="book" src="book.png" alt="" width="100" height="123" />




Code:

<script>
$(document).ready(function(){
      $('#clickme').click(function() {
      $('#book').fadeToggle('slow');
      });
    });</script>

no effect ...

did you linked the fadetoggle plugin?

this is my code from the wiwetopicbody !

Code:
    <head>
    <script src="http://code.jquery.com/jquery-1.6.2.min.js" type="text/javascript"></script>
    </head>
    <style>
    #box {
    background-color: blue;
    width: 300px;
    height: 300px;
    }
    </style>

    <script type="text/javascript">
      $ (function() {
        $ ('a').click(function() {
            $ ('#box').fadeToggle('normal');
      });
    });
    </script>

    <div id="box"></div>
    <a href="#">Click here</a>

Try host this in your forum Smile
http://www.worlddezign.com/11821.js

Solved !

Solved + Locked Smile