WordPress jquery handles sofa portraits

Source: Internet
Author: User

I think this is not fair to sofa. Yesterday I was reading yinheli's article "Hovering the mouse to display the message content" (I suggest you check it out. Article), Why don't I copy the head picture of the sofa and place it in a conspicuous position.

First, your website loads jquery, and then adds a <div> to the place where you want to place the sofa avatar. if the content is blank, you can: CopyCodeThe Code is as follows: <Div id = "Shafa"> </div>

The next step is to use js to copy the head image of the sofa and enter the copied content in the <div> set above:Copy codeThe Code is as follows: $ (document). Ready (function (){
$ (". Commentlist. Avatar: Last IMG"). Clone (). appendto ("# Shafa ");
});

In this way, pay attention to the above
Avatar
Assume that your topic template contains the style name of the Avatar image. Then
: Last
This is set for inverted message boards like me, because sofa students are at the end of the message list, and for ordered message boards, they are changed
: First
.
Also, do not forget to define CSS styles. In the same way, you can copy the specified content, such as the comment and name of the sofa, as long as they correspond to their style names.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.