Quantcast
Channel: Topic Tag: action | WordPress.org
Viewing all articles
Browse latest Browse all 892

niraham on "[Plugin: Draw Attention] how to extract the "more info - lightbox" action code"

$
0
0

With a little help from my friend I managed to do it. I just had to set an "id" to each table and the rest did the code:

jQuery( "#idOfTheTable" ).on( "click", "tr", function() {
  var el = jQuery(this);

  if(el.find('th').length > 0 ) {
    return false;
  }

  var apartNo = el.parent().find('tr').index(el);
  var hotspotName = jQuery('.hotspots-image-container img').attr('usemap');

  if(!apartNo || !hotspotName) {
    return false;
  }

  jQuery(hotspotName + "-area-" + apartNo).trigger('click');
});

This is how it looks like:
http://apartamenty-sonata.pl/mieszkania/budynek-nr-1-pietro-iv

Hope this'll help someone.

Resolved. :)


Viewing all articles
Browse latest Browse all 892

Trending Articles