SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 29 of 29
  1. #26
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,938
    Mentioned
    214 Post(s)
    Tagged
    12 Thread(s)
    Sorry for the short reply, I'm about to go out.

    In custom.js, you have:

    Code JavaScript:
    ...
        JQuery("#randomImage a").html(img);
        JQuery("#randomImage a").attr("href", path);
      }
    }
     
    JQuery(document).ready(function(){ 
    ...

    "JQuery", should be "jQuery"

  2. #27
    SitePoint Enthusiast
    Join Date
    Feb 2013
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Pullo View Post
    Sorry for the short reply, I'm about to go out.

    In custom.js, you have:

    Code JavaScript:
    ...
        JQuery("#randomImage a").html(img);
        JQuery("#randomImage a").attr("href", path);
      }
    }
     
    JQuery(document).ready(function(){ 
    ...

    "JQuery", should be "jQuery"

    Great thanks, that made it work. I want to make the image a link that goes to "http:www..", how can i do that ?

    Tried this <div id="randomImage"><a href="http://www.googe.com"></a></div>

  3. #28
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,701
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by ingenting View Post
    Great thanks, that made it work. I want to make the image a link that goes to "http:www..", how can i do that ?

    Tried this <div id="randomImage"><a href="http://www.googe.com"></a></div>
    Do you want the link to always go to the same place? If so, remove the statement that changes the href attribute.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  4. #29
    SitePoint Enthusiast
    Join Date
    Feb 2013
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paul_wilkins View Post
    Do you want the link to always go to the same place? If so, remove the statement that changes the href attribute.
    Perfect, works great Thanks Paul


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
  •