Currently I am recording all the changes made by Jquery as this:
$.fn.meChangeText = function ($text,$textpath) {
$(this).html($text);
//I am storing the code block here storing in a string
$codeblock = $codeblock + "\n" +
"$(\"" + $textpath + "\").html(\"" + $text + "\");"
};
Is there another way where I can convert $(this).html($text) function to a string? This means let say I am changing:
$("#id1").text("I am changing");
I want it to be in a string as this:
var code = "$(\"#id1\").text(\"I am changing\");"
Update
Why am I doing this?
This is because I want to store all the changes made in a database.