Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Highlighting an area of an image map based on search text

    I have achieved the ability to highlight a <div> based on search text. You can view the JSFiddle here.

    Now, I'm trying to apply the same concept to a set of mapped coordinates on an image map, and I'm having issues getting it to work.

    Each set of mapped coordinates will have a text value assigned so it remains searchable.

    Here's the JS I have so far...

    Code:
    	function doSearch(text) {
    		$('#content div').removeClass('highlight');
    		$('#content div:contains(' + text + ')').addClass('highlight');
    	}
    Thoughts?

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,965
    Thanks
    0
    Thanked 236 Times in 233 Posts

  • #3
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have tried that, but to my knowledge, it only employs svgs for this situation, and I can't use those as well as I'd like. It seems buggy.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •