9. A Greater Selection - making it work beyond codecademy


#1


https://www.codecademy.com/en/courses/web-beginner-en-jtFIC/1/4?curriculum_id=50a3fad8c7a770b5fd0007a1


I tried getting this exercise working in Sublime text and Chrome but kept getting this error:

Uncaught TypeError: e(...).parents(...).andSelf is not a function

After searching around it seems to be that the versions of jQuery and jQuery ui which are used are not the most recent. Since I was not satisfied not having it work beyond codecademy so I played around with the selection of .js files and got the exercise working. Here is the HTML if you are interested in getting it working in a different environment than the codecademy editor:


  <head>
    <title>Select Ye Favorite</title>
    <link rel='stylesheet' type='text/css' href='stylesheet.css'/>
    <script type='text/javascript' src='https://code.jquery.com/jquery-3.2.1.min.js'></script>
    <script type='text/javascript' src='script.js'></script>
    <script type='text/javascript' src='https://code.jquery.com/ui/1.12.1/jquery-ui.min.js'></script>
  </head>

Let me know if you have any questions.
Otherwise, Enjoy!


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.