Loading gravatar using jquery

前端 未结 4 790
轮回少年
轮回少年 2021-01-31 18:31

Just trying to crate a simple comment form on a blog. I want to load the user\'s gravatar (using jQuery) when he/she writes this in the email box.

How can I do that?

4条回答
  •  萌比男神i
    2021-01-31 18:43

    check out my fiddle providing the function

    get_gravatar_image_url (email, size, default_image, allowed_rating, force_default)
    

    Only providing the email is mandatory - the rest uses default values.

    Be sure to also include the de-facto-standard MD5-generator JS file from Joseph Myers with

    
    

提交回复
热议问题