app icons in prices prepend using js


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function icon_prepend(str){
  2. var path = '.'+str;
  3. strprep = '<img src="/images/'+str+'.gif" class="icon" />';
  4. $(path).prepend(strprep);
  5. }
  6.  
  7. подставляем через яваскрипт иконки приложений в прайсах.
  8. использование:
  9.  
  10. icon_prepend('excel');
  11. icon_prepend('word');
  12. icon_prepend('zip');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.