如何使用幻灯片切换功能为每个按钮添加各种隐藏的div(内容)

时间:2013-10-08 22:51:29

标签: javascript html

我到处寻找,却找不到任何类似的东西。

> I need this Slide toggle function  to work for various hidden divs
> (that contain images and text) that belong to each button,if it's
> possible the hidden divs slide from the right or even from bottom to
> up.Also if it's possible to add hoover on buttons to let the user know that
they are buttons to click on them, 

如果需要更多解释,请告诉我。我将非常感谢您的帮助!

Slide toggle from right- Js fiddle

这个想法的解释在这里:

enter image description here

1 个答案:

答案 0 :(得分:1)

如果您希望所有字段都是必填字段,则$name$email中的任何一个为空时都会出错;所以你使用OR。此外,如果反垃圾邮件不是4,只是抛出错误,您不必检查$_POST['submit'],因为您已经检查过它。

  if ($_POST['submit']) {
        if ($name != '' OR $email != '') {
                if ($human == '4') {                 
                        if (mail ($to, $subject, $body, $from)) { 
                                echo '<p>Your message has been sent!</p>';
                        } else { 
                                echo '<p>Something went wrong, go back and try again!</p>'; 
                        }
                } else {
                        echo '<p>You answered the anti-spam question incorrectly!</p>';
                }
        } else {
            echo '<p>You need to fill in all required fields!!</p>';
        }
}