You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 rivejä
1.4 KiB

  1. (function($) {
  2. $(function() {
  3. var demo = $('#demo');
  4. var sizeInput = demo.find('input[type="range"]');
  5. var textInput = demo.find('input[type="text"]');
  6. var iconToggle = demo.find('input[type="radio"]');
  7. sizeInput.change(function() {
  8. var val = $(this).val() + "px";
  9. demo.find('.zocial').css('font-size', val);
  10. demo.find('#font-size-display').text(val);
  11. })
  12. textInput.keyup(function() {
  13. var newlabel = $(this).val();
  14. demo.find('.zocial').text(newlabel);
  15. })
  16. textInput.blur(function() {
  17. if ($(this).val().length<1) demo.find('.zocial').text("Sign in with Google+");
  18. })
  19. iconToggle.click(function() {
  20. if ($(this).attr('id') == "select-icon") demo.find('.zocial').addClass('icon');
  21. else demo.find('.zocial').removeClass('icon');
  22. })
  23. $(document).ready(function() {
  24. $('#button-lightbox a').click(function() {
  25. _gaq.push(['_trackPageview', '/hide/button_preview']);
  26. })
  27. })
  28. $('#button-sample').click(function() {
  29. _gaq.push(['_trackPageview', '/view/button_preview']);
  30. })
  31. $('#show-examples').click(function() {
  32. _gaq.push(['_trackPageview', '/view/code_example']);
  33. $('#howto').removeClass('compact');
  34. $(this).remove();
  35. return false;
  36. })
  37. demo.click(function() {
  38. _gaq.push(['_trackPageview', '/view/demo']);
  39. })
  40. $('#purchase-area a').click(function() {
  41. _gaq.push(['_trackPageview', '/click/' + $(this).attr('id')]);
  42. });
  43. })
  44. })(jQuery)