SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Object expected

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Object expected

    On this page i keep getting the error message:
    Object expected line:
    112

    Line 112: is
    Code:
    $('a.poplight[href^=#]').click(function() {
    the address is site
    click Join Us at the bottom of the page (footer). This link works on all the other pages except this one.Can someone point out where it is i have gone wrong please?

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This error is sorted now! I forgot to include the script source:
    Code:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>

  3. #3
    Forums Designer
    Join Date
    Jun 2004
    Posts
    422
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try executing your code after document has been created, not during its creation. Like this:
    Code:
    $(document).ready(function() 
    {
    
    assign your onclick event here
    
    });


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
  •