MOVE - jquery widget not attaching to correct element


I've got everything working for the autocomplete jQuery UI widget except where it gets appended to. Right now the best I can do is this:

This is my JS:

var main = function() {
    var cities = [
    $( "#CitySearch" ).autocomplete({
      source: cities,
      appendTo: ".form-inline"

this is the html:

<!doctype html>
    <link href=',700' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="style.css">
    <link rel="stylesheet" href="//">
    <script src=""></script>
    <script src="//"></script>
  <script src='app.js'></script>
    <div class="main">
      <div class="container">
        <p>Form healthy habits to take your fitness to the next level.</p>
        <form class="form-inline">
          <div class="form-group ui-widget">
    <label class="sr-only" for="CitySearch">Find your city</label>
    <input type="text" class="form-control" id="CitySearch" placeholder="Find your city">
  <button type="submit" class="btn btn-default sr-only">Send invitation</button>

    <div class="supporting">
      <div class="container">
        <div class="col">
          <p>Become more active by tracking your runs, rides, and walks.</p>
        <div class="col">
          <p>Access your activity on your phone, tablet, or computer.</p>
        <div class="col">
          <p>Set personal challenges and see how you rank against your friends.</p>
        <div class="clearfix"></div>

    <div class="feature">
      <div class="container">
        <h2>Move. Rest. Recover. Move.</h2>

    <div class="supporting">
      <div class="container">
        <h2>Go Premium</h2>
        <p>Receive recommendations based on your activity to level up.</p>
        <a class="btn" href="#">Learn More</a>

    <div class="footer">
      <div class="container">
        <h2>Stop scrolling. Start moving</h2>
        <a class="btn" href="#">Start Now</a>

Can anyone see why it's not attaching properly?


Please post a link to this exercise. Thanks.



Unfortunately, once we complete this project our code is wiped so we have nothing to which we may refer afterward. And since we cannot access the code editor, we cannot test your code, either. I'm afraid you will have to engage an advisor on this and possibly any subsequent Pro problems.


I encountered similar problems with this project. I was able to get it working by changing the way I imported the jQuery library. Rather than using the src link suggested by the lesson, I used the src link that the Here's what it looks like example uses. I also formatted the jQuery UI src link correctly. The instructions provide a link missing https:. Compare your <script> tags above with what I've included below:

<script src=""></script>
<script src=""></script>
<script src='app.js'></script>

I also found that appendTo was unnecessary. Your #CitySearch selector should be sufficient. Hope this helps.


thank you! it works with these tags.