Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. $.fn.tmp = function(obj) {
  2. this.each(function() {
  3. var str = this.innerHTML
  4. for (var key in obj) {
  5. str = str.replace(new RegExp('{{ ' + key + ' }}', 'g'), obj[key])
  6. };
  7.  
  8. this.innerHTML = str
  9. })
  10.  
  11. return this
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement