Quiz

  1. can we go over question 1. i feel like both b and c are correct and don't really know the difference between the two.

    Here's the question:

    If a user's browser doesn't support javascript, a site using the jQuery UI
        A. will be broken and unusable
        B. will be able to fall back to HTML primitives
        C. should use progressive enhancement instead
        D. none of the above
    

    The jQuery UI already uses progressive enhancement, so the user's browser doesn't use progressive enhancement instead. It's not switching to a different solution: the jQuery UI solution "gracefully degrades."

  2. In the source code for the Autocomplete feature, they used the HTML attribute "for". What is it for, and is it necessary for the jQuery UI to work?

    I think this question is about the following code:

    
    <div class="ui-widget">
      <label for="tags">Tags: </label>
      <input id="tags">
    </div>
    
    

    This is one of the two ways to use the LABEL tag:

    1. structural: You can wrap the label around the input, or
    2. for/id: You can give the input an ID and give the label a FOR

    So, this is nothing to do with jQuery UI, but instead about forms and labels.

  3. Are there any downsides to using jQuery UI widgets? Like in Bootstrap when websites were becoming too similar because it was so widespread.

    Great question! I have not heard about sameness among websites, but it's possible. Fortunately, many of the jQueryUI features are pretty "invisible" (like autocomplete or sortable).

    Another downside is that often the "native" feature is just a little better. For example, I used to love the jQueryUI datepicker, but most modern browsers have datepickers built-in and, frankly, those are a bit better.

    As is so often the case, there's a tradeoff between broad applicability and "latest and greatest".