In my dialog I want to change specific content like in my dialog I have written "Search result for {{currentPage}}". Now I want to change only content of {{currentPage}} using js. How can that be done?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @ShagunMalik
Using jquery you can do something like below:
<div class="something">Search result for {{currentPage}}</div>
var replaceString = $(".something").text();
var text = replaceString.replace("{{currentPage}}", "whatever text");
$(".something").text(text);
Thanks!
Hi @ShagunMalik
Using jquery you can do something like below:
<div class="something">Search result for {{currentPage}}</div>
var replaceString = $(".something").text();
var text = replaceString.replace("{{currentPage}}", "whatever text");
$(".something").text(text);
Thanks!
Views
Replies
Total Likes
@ShagunMalik Yes you can do using either Id or Class.
<div id="something">Search result for {{currentPage}}</div>
var replaceString = $("#something").text();
var text = replaceString.replace("{{currentPage}}", "whatever text");
$("#something").text(text);
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Like
Replies