How to change between text and icon using jQuery -


i have piece of code dropdown selection. want change text contained inside span icon.

i have more complex code in background, allows me dynamically change values of number of divs specified user, post here part of code think useful me this.

$("select.heating-type-select").on("change", function () {     $("." + target + " span.heating-type-room").html($(this).val());                 }); 

so, explain code, have undefined number of divs created every time, , every div create row options, example 1 in code.

are there way add @ bottom of code if statement says (is not code logic)

i have value ($(this).val()), before replace text value want check

if(previousvalue == something) {     replace previousvalue html tag) , add html } else add value have since 

thanks lot


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -