$('#show').click(function(){
$('#popup').fadeIn("slow", function(){
$(other things).click(function(){
$('#popup, #show').hide();
});
});
});
2009/8/13 David .Wu <[email protected]>
>
> There is a button control a div show or not, I want when you click
> other things then the div will disappear too exclude div itself and
> also the show button, how to do that?
>
> [html]
> <html>
> ....
> .....
> <input type="button" id="show" value="show">
> <div id="popup" style="display: none;">
> ....
> ..
> </div>
> ....
> </html>
>
> [JavaScript]
> <script>
> $('#show').click(function(){
> $('#popup').toggle();
> });
> </script>
>