Guest User

Untitled

a guest
Oct 23rd, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. Insert this string to your HTML head:
  2. ```html
  3. <script src="https://cdn.rawgit.com/icons8/titanic/master/dist/js/titanic.min.js"></script>
  4. <script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/4.5.9/bodymovin.min.js"></script>
  5. ```
  6. And initialize it before the body closes:
  7.  
  8. ```html
  9. <script>
  10. var titanic = new Titanic();
  11. </script>
  12. ```
  13. This way, you can add icons anywhere in your HTML using this tag:
  14. ```html
  15. <div class='titanic titanic_chat'></div>
  16. ```
  17. Where chat can be any of these:
  18. * caps
  19. * chat
  20. * checkbox
  21. * expand
  22. * cheap
  23. * expensive
  24. * idea
  25. * mailbox
  26. * mic
  27. * no-mic
  28. * online
  29. * pause
  30. * power
  31. * shopping
  32. * smile
  33. * stop
  34. * unlock
  35. * zoom
  36.  
  37. ### Hosting your images
  38.  
  39. If you'd like to host your images on your server instead of rawgit, pass the base URL with the init() function:
  40. ```javascript
  41. titanic.begin('/my/base/directory/');
  42. ```
  43. Then, if you have a div with id="chat", Titanic will search for icons in /my/base/directory/chat.json.
  44.  
  45. <div class='titanic titanic_chat'></div>
Add Comment
Please, Sign In to add comment