SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2007
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Syntax Error in Script after upgrading site from jQuery 1.7.2 to 1.8.3

    Hello all,

    I upgraded our WordPress site today and now it looks like I've broken the functionality of our main form. DOH!

    Our site is http://www.cnatraining.com/

    The form on the side is supposed to take you through steps 1 through 5 before sending you to the "/schools" page. However, since the upgrade, the form skips straight from Step1 to the schools page. As far as I can tell, the newer jQuery version (1.8.3) doesn't play nice with our custom script. The script worked fine before the upgrade, when the site used jQuery 1.7.2.

    In my feeble attempt to figure out what was going on, I turned on WP's debugging mode. I was able to get this message:

    Uncaught Error: Syntax error, unrecognized expression: #step-1 input['radio'].required

    That error showed up on my debugging console only for a split second after clicking the 'Next' button, and before being taken to the schools page. The problem is, I'm not sure how to fix.

    I'd really appreciate any help.

    Thanks in advance!
    Independent Web Designer/Developer in Mandeville, LA USA
    1. JoeyReed.com
    2. Crawfish.com
    3. Pralines.com

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,189
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Instead of
    Code:
    #step-1 input['radio'].required
    try
    Code:
    #step-1 input:radio.required

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2007
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Chris,

    Many thanks for your speedy reply. Your solution worked perfectly!

    Cheers!
    Independent Web Designer/Developer in Mandeville, LA USA
    1. JoeyReed.com
    2. Crawfish.com
    3. Pralines.com

  4. #4
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,189
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    No problem, glad to help


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
  •