Help with Gmail Avatars

Hello,

I’m trying to use the following plugin on my web site:
http://judelicio.us/initial.js/

My Javascript knowledge is very limited so I don’t know what I’m doing wrong.

I’m calling /initial.js-master/dist/initial.min.js" in my page and copied some of the source code from the page above, but it’s not working.

Any help is appreciated.

Try this. Input

<script src="directory of initial.js"></script>

inside the head or body (try with one or another)
Then in your img tag try this

 <img data-name="Write whatever you want" class="profile"/>

and below img tag write this

<script>$('.profile').initial();</script>

Hello,

Thanks for the reply. I adjusted the path and put the first line of code inside the head and when that didn’t work I put it inside the body. Still doesn’t seem to be working.

Where is the profile class being pulled from? When I downloaded the package, I didn’t see any stylesheet. Thx.

You must set in the img the class profile so the JQuery $(‘.profile’) set all css styles

My image tag looks like this:

<img data-name="test" class="profile"/> but nothing is happening.

Can you copy paste the code to see into?

Take a look into this
https://hannahdnallen.wordpress.com/2014/02/20/steps-to-installing-a-jquery-plugin/

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.