• greetings, a. nonymous
You are here:


this sig is for all things world-wide-web



  • test 1

    aaa bbb ccc ddd eee gggg
  • bbbb

    c d e f g
  • aaa

    bbb ccc ddd
  • hover over member name in posts and links shows member details inside jqueryui tooltip

    if you hover over a member name in a post or a link anywhere on zoidweb, a jqueryui tooltip will show up with member details. if you are logged into an account with the ADMIN flag or if you are viewing your own account, the tooltip will include private data like email address, ip address of last login, and stats like how many links and posts have been made from the account. this feature gracefully degrades to a normal link to the member's detail page if javascript is not available.

    behind the scenes, some javascript runs that looks for all "A" tags with the class "tooltip". it then uses the value of the "data-contenturl" attribute of the A tag to populate the tooltip via jquery. in the original code that was the basis for this feature, the "rel" attribute of the "A" tag was overloaded to contain the content URL which breaks validation at least and likely does nothing for accessibility. note that the tooltip is populated at the time of page load, not every time you hover.

  • tooltips updated to make the same request exactly once saving bandwidth and ram

    tooltips were working for posts and mantra details except that an AJAX request was made for every url even if it had already been loaded. this wastes bandwidth and RAM and I set about making it more efficient.

    today (2015-sep-15) I got some help from some nice people in ##javascript on freenode that helped me save resources when doing tooltips.

    the trouble I was having was that the cache was always initialized to empty. I thought at first it was a scoping problem which was not the case.

    behind the scenes, the AJAX requests are asynchronous. in the working javascript there is an array (list) that keeps track of the pending AJAX requests. on AJAX success, the list entry corresponding to the url is deleted and the response is pushed to the cache which is used to display the tooltip with exactly one AJAX request per unique url.