开发者

how can I hide a text by referring to a CSS class or id?

        <script开发者_如何转开发 type="text/javascript" src="jquery.js"></script>
        <script type="text/javascript">
        $(document).ready(function(){
          $("span").click(function(){
            $(.comment).hide();
          });
        });
        </script>

       <a class=".comment">comment</a>'<br/><span class="comment">&bull;<a style="padding-left:3.5px;" href ="">Comment</a></span><form align="left" id="bring" action="profile.php" method="post" enctype="multipart/form-data" name="blab_from">
<textarea name="blab_field" rows="3" style="width:100%; height:30px;"></textarea>
 <input id="bringinput" name="submit" type="submit" value="submit" align="left" />
</form></td>

how can I hide the "&bull comment" text and make the form appear with that jquery?


Remove dot(.) in class attribute and then try.

<a class="comment">comment</a>


Try changing this:

<a class=".comment">comment</a>

to this:

<a class="comment">comment</a>

but keep your jQuery javascript the same.

The dot in front of comment tells jQuery to look for a class named comment, not .comment.


you have wrong class definition at tag (don't use a dot)

use this <a class="comment">comment</a>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜