SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru etidd's Avatar
    Join Date
    May 2011
    Location
    atlanta, ga
    Posts
    632
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Post Applying jQuery font Effect Plugin

    Hello everyone,

    I don't know what I'm doing wrong to not obtain any of these 4 Font Effects I found on the web for jQuery. I followed the instructions as closely as I could from FontEffect jQuery plugin. Here is the code I put in.

    The Script in the HTML:

    Code:
    <script href="http://code.jquery.com/jquery-1.6.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="jquery-fonteffect-1.0.0.js"></script>
    <script type="text/javascript">
    $('#realmaturesingles').FontEffect({
    		gradient:true,
    		mirror:true,
    		mirrorColor:"#298d79"
     })
    </script>
    I applied it to an element of HTML:

    Code:
    <a href="http://www.atlantareviewgroup.com/dating/realmaturesinglesreview1.php" id="realmaturesingles">Real Mature Singles</a>
    Then I styled it in css:

    Code:
    #realmaturesingles{
    	text-decoration:none;
    	font-family:Impact;
    	font-size:3em;
    	color:#CF0;
    }
    I don't seem to know what the problem is.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    If your script is in the head, the body won't exist at the time the script is run, so the effect won't take place.

    Put the script and the end of the body, just before the </body> tag. That is also one of the best-practice pieces of advice for speeding up your web site.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Guru etidd's Avatar
    Join Date
    May 2011
    Location
    atlanta, ga
    Posts
    632
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Great Post!


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •