SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $(document).ready not working?

    i have two pages A & B

    A shows the intended functionality of the fading images/text on the left, the video image that pops up a jquery tools expose overlay, and the tabs on the bottom left

    page B is identical in all ways that i think matter. in other words, the javascript and html elements are all the same. the only other difference is that page B is created via a wordpress theme.

    any ideas on why B isn't working?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,025
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    At first I thought it might be similar to the problem discussed in this thread. http://www.sitepoint.com/forums/showthread.php?t=634942

    But as the error console shows
    Code:
    Error: m has no properties
    Source File: http://cdn.jquerytools.org/1.1.0/full/jquery.tools.min.js
    Line: 50
    and the only "m"s I see are
    HTML Code:
    .....
    <link rel='archives' title='September 2009' href='http://hoksba.org/v2wp/?m=200909' />
    .....
    <li><a href='http://hoksba.org/v2wp/?m=200909' title='September 2009'>September 2009</a></li>
    .....
    maybe the page's script is expecting an "m" GET variable?

  3. #3
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok. i changed the way i was loading the external scripts and used the wp_enqueue_script() method insead. it's still not working, but i am getting a different error. i had to change the way i called the jquery functions because wordpress loads jquery in "no conflict" mode.

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,025
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    Now the error message is "jquery" is undefined. Does "jQuery" work?

  5. #5
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm not sure. how would i test that?

  6. #6
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,025
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    Change the "q" to "Q" in whatever file is responsible for
    HTML Code:
    .....
    <!-- end top-common.php -->
    
    <script>
    jquery(document).ready(function($) {
    .....
    (the theme's header.php file?) upload to your server, refresh your browser cache, and reload the page.

  7. #7
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    did that make it work for you? it's still not working on my end.

  8. #8
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it's working now. the issue was a missing div. the div that was being used to create the overlay. i put it in, and it works. all jquery is working as it should. thanks for your help. sorry for my stupidity.

  9. #9
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,025
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    No reason to feel stupid, when something's broken it's always something. And usually something small. The only stupid thing would be to ignore the problem without trying to fix it.

    I once had a stray backtick - ` - in my code (my cat walked on the keyboard!) and I looked for hours before I finally noticed it.


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
  •