Summer Sale! All accounts are 50% off this week.

atif123's avatar

How to underline existing inner html from jquery

when click on

  • value 1
  • value2
  • it should be underline value1 underline value2

    $(document).ready(function() { $('li').click(function() { $(this).html(' completed it should be underline
    0 likes
    4 replies
    jlrdw's avatar
    jlrdw
    Best Answer
    Level 75

    Off topic again, but @atif123 I noticed you are new here to the forum, Welcome.

    Also later on to keep it underlined, say you have to leave and come back later to finish, you probably need another control for a flag, like a checkbox. Then if the checkbox is checked trigger above code to show underlined.

    And how are you saving to database. Anyway just post a new question when you get to next step.

    1 like
    jlrdw's avatar

    Also there can be quite a learning curve involved here but there are free jQuery tutorials and you can always post code here and ask questions.

    Please or to participate in this conversation.