SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Nice Titles with Images?

    Can it be done?

    If so, how?

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I'm sure it can be. You'd have to modify the JS to make it include the image in the HTML it creates. It would probably require some tweaking of the CSS.

    I don't think you'll find someone willing to open up nicetitle.js, examine the code, work out how it works, edit it to include an image (which you haven't specified much information about at all) and then test it to see if it works.

    Have a go at it and if/when you fail, post a detailed summary of what you did, what went wrong and an example, either via a link or via pasted code.

    The more information you provide, the more people will be able to, and be willing, to help. Common sense, I would have thought.

  3. #3
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Raffles View Post
    I'm sure it can be. You'd have to modify the JS to make it include the image in the HTML it creates. It would probably require some tweaking of the CSS.

    I don't think you'll find someone willing to open up nicetitle.js, examine the code, work out how it works, edit it to include an image (which you haven't specified much information about at all) and then test it to see if it works.

    Have a go at it and if/when you fail, post a detailed summary of what you did, what went wrong and an example, either via a link or via pasted code.

    The more information you provide, the more people will be able to, and be willing, to help. Common sense, I would have thought.
    Well I would love to do that, but I am new at javascript so I was looking for some help.

    I will try and see what I can do.

  4. #4
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    In nicetitle.js, find this:
    Code:
    var d = document.createElementNS(XHTMLNS,"div");
        d.className = "nicetitle";
    You need to create an image element, so add this after d.appendChild(pat):
    Code:
    var im = document.createElement('img');
    im.setAttribute('src', 'yourimage.gif');
    d.appendChild(im);
    Then position it where you want with CSS.

  5. #5
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wish I knew what u were talking about, lol

  6. #6
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Have you opened up nicetitle.js and looked inside it? Find the text d.appendChild(pat) and on a new line paste the code I posted beforehand, modifying it to point to the image you want.


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
  •