image-map.js 600 B

12345678910111213141516
  1. define(["require", "jquery"], function (require, $) {
  2. $(document).ready(function () {
  3. // If we have image maps in our HTML document then we should load the highlight and resize libraries.
  4. var imageMaps = $('img[usemap]');
  5. if (imageMaps.length > 0) {
  6. require(["jquery.maphilight", "jquery.rwdImageMaps"], function () {
  7. /**
  8. * Responsive highlighted image maps
  9. */
  10. $('img[usemap]').rwdImageMaps();
  11. $('img[usemap]').maphilight();
  12. });
  13. }
  14. });
  15. });