You can use the JavaScript replace function. Here is a basic example:
$('#container').html($('#container').html().replace(/(dog)/g,'<span class="highlight">$1</span>'));
More Related Contents:
- JQuery search in static HTML page with highlighting of found word
- Can I open a dropdownlist using jQuery
- iframe to Only Show a Certain Part of the Page
- Play/pause HTML 5 video using JQuery
- How to set data attributes in HTML elements
- How to automatically change the text size inside a div?
- jquery IE Fadein and Fadeout Opacity
- jQuery html() in Firefox (uses .innerHTML) ignores DOM changes
- Activate CSS3 animation when the content scrolls into view
- Store JSON object in data attribute in HTML jQuery
- Jquery datepicker restrict dates in second date field based on selected date in first date field
- Jquery click event not working after append method
- current/duration time of html5 video?
- How to bind to localStorage change event using jQuery for all browsers?
- Selecting only first-level elements in jquery
- get html of external url in jquery
- How to make Bootstrap carousel slider use mobile left/right swipe
- What’s the difference between class and id in jQuery?
- Google Map v3 auto refresh Markers only
- Display XML content in HTML page
- Run JQuery in the context of another frame
- HTML5 textarea placeholder not appearing
- is it possible to have html inside of a jqgrid treegrid cell
- Merge values from two forms on submit
- Get index of selected option with jQuery
- How to load external html into a div?
- Store and use an array using the HTML data tag and jQuery
- Dynamically adding HTML form field using jQuery
- HTML + Add input field inside a dropdown box
- How do I select an element with special characters in the ID?