IP250F13A jQuery Session Two follow-up

Here’s a few follow up items from tonight’s session.

  • jQuery.each() working example
    We’ll take a closer look next week, but if you can’t wait, check out the link above.
  • Pat here’s a quick example of marking up search results. It’s pure JavaScript, but the interesting part is using the Regular Expression to find the search text, then .replace() to put the markup around the search term. I’m using the HTML5 <mark></mark> element to show the hits.
  • Brian, if you’d like to post a link to that menu in a <ul> that you showed me, I’d like to look at that again. I think that we should have been able to see the changes in the developer tools view of the Document Object Model or HTML.  You can post the link as a comment to this post.

4 thoughts on “IP250F13A jQuery Session Two follow-up

  1. Brian says:

    I think this is the version we were looking at http://jsbin.com/EViFopoD/4/

  2. JimUBC says:

    Thanks Brian, I’ll take a look.

    • JimUBC says:

      Hi Brian,
      Check this out: http://jsbin.com/ADIYoZa/2/
      I rewrote things two ways. The first way attempt1() – what you’ll see when you follow the link

      and second attempt2(). Just comment out line 16 and uncomment line 28

      They both yield the same results.

      For debugging – send the output off to a new window.

      In both IE 11 and Chrome I was able to see the results live by pressing f12 in the new output windows. I don’t know why we couldn’t see these in the lab, but it’s easier than writing .text() and .html() to see the output.

      Click the pictures to see them full-sized…
      F12 Developer Tools in IE 11

      Google Chrome
      Google Chrome F12 Developer view

  3. patmcculloch says:

    Thanks Jim, I appreciate that – I may steal it and write some jQuery on top of it! I feel like having a good general-purpose searcher would come in handy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s