Put Special words and symbols into an element with jquery -


i have text combine persian language , html elements , english words. want engilsh words , other symbols like( <> ) inside paragraph not other element(like pre) placed span tag. how jquery?

before:

 در این قسمت تمرکز ما بر linq objects است که در پرس و جوی مجموعه ای از اشیاء در کد شما که رابط ienumerable<t> را پیاده سازی می کنند مورد استفاده<imge src="wp/contet/image.png"> قرار می گیرد. 

after:

 در این قسمت تمرکز ما بر <span>linq objects</span> است که در پرس و جوی مجموعه ای از اشیاء در کد شما که رابط <span>ienumerable<t></span> را پیاده سازی می کنند مورد استفاده<imge src="wp/contet/image.png"> قرار می گیرد. 

i use code

$("p").each(function (){   var current_element = $(this);   var old_value = $(this).text();   old_value = old_value.replace(/([a-za-z]+)/g, "<span>$1</span>");   current_element.html(old_value);}); 

but image hidden!


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -