Working with strings/text

Working with strings/text

Hi all,

I am looking for a way of delimiting a string of text within a list element, I reckon this is possible with jQuery but I am still very much a novice when coding my own scripts rather than opting for plugins.

What I am trying to do is look for a <br> within a <li> and then style the first line of the list item differently to the remaing lines (within the same list item) - hope that sort of makes sense!? I need to this on a list that is being pushed out of a CMS dynamically, otherwise I would just style it manually.

e.g.

  1. <ul>
  2.   <li>This title should be wrapped in strong tags<br>
  3.         And this sub text if you like, should remain at a font weight of normal.
  4.   </li>
  5. </ul>
with the on screen result being:

  • This title should be wrapped in strong tags
    And this sub text if you like, should remain at a font weight of normal.
Can anyone point me in the right direction?

Cheers,

Gordon
Moray Web Solutions