Changeset 1335209
- Timestamp:
- 01/25/2016 01:48:36 AM (10 years ago)
- Location:
- typed/trunk
- Files:
-
- 4 edited
-
js/admin.js (modified) (3 diffs)
-
js/frontend.js (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
typed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
typed/trunk/js/admin.js
r1297650 r1335209 1 $ = jQuery; 2 $(document).on('click', '.add_typed_string', function () { 1 2 jQuery(document).ready(function (jQuery) { 3 4 jQuery(document).on('click', '.add_typed_string', function () { 3 5 var html = '<p><input type="text" name="typed_strings[]" value=""/> <a href="javascript:void(0)" class="add_typed_string button-secondary">+</a> <a href="javascript:void(0)" class="remove_typed_string button-secondary">-</a></p>'; 4 $('.typed_strings_container').append(html);6 jQuery('.typed_strings_container').append(html); 5 7 }); 6 8 7 $(document).on('click', '.remove_typed_string', function () {8 $(this).parent().remove();9 jQuery(document).on('click', '.remove_typed_string', function () { 10 jQuery(this).parent().remove(); 9 11 }); 10 12 11 jQuery(document).ready(function ($) { 13 14 12 15 //color field 13 $('.typed-color-field').wpColorPicker();16 jQuery('.typed-color-field').wpColorPicker(); 14 17 15 18 //typed admin perview 16 if ( $('.typed_perview_div').length > 0) {17 var strings = $('.typed_perview_div').attr('data-strings').split(',');18 var speed = $('.typed_perview_div').attr('data-speed');19 var delay = $('.typed_perview_div').attr('data-delay');20 var back_delay = $('.typed_perview_div').attr('data-back-delay');21 var back_speed = $('.typed_perview_div').attr('data-back-speed');22 var loop = $('.typed_perview_div').attr('data-loop');19 if (jQuery('.typed_perview_div').length > 0) { 20 var strings = jQuery('.typed_perview_div').attr('data-strings').split(','); 21 var speed = jQuery('.typed_perview_div').attr('data-speed'); 22 var delay = jQuery('.typed_perview_div').attr('data-delay'); 23 var back_delay = jQuery('.typed_perview_div').attr('data-back-delay'); 24 var back_speed = jQuery('.typed_perview_div').attr('data-back-speed'); 25 var loop = jQuery('.typed_perview_div').attr('data-loop'); 23 26 if (loop == 'yes') 24 27 loop = true … … 26 29 loop = false; 27 30 28 var cursor = $('.typed_perview_div').attr('data-cursor');31 var cursor = jQuery('.typed_perview_div').attr('data-cursor'); 29 32 if (cursor == 'yes') 30 33 cursor = true … … 32 35 cursor = false; 33 36 34 var cursor_char = $('.typed_perview_div').attr('data-cursor-char');37 var cursor_char = jQuery('.typed_perview_div').attr('data-cursor-char'); 35 38 36 $(".typed_perview_div").typed({39 jQuery(".typed_perview_div").typed({ 37 40 strings: strings, 38 41 typeSpeed: parseInt(speed), -
typed/trunk/js/frontend.js
r1292197 r1335209 1 jQuery(document).ready(function ( $) {2 $('.typed_perview_div').each(function () {3 var strings = $(this).attr('data-strings').split(',');4 var speed = $(this).attr('data-speed');5 var delay = $(this).attr('data-delay');6 var back_delay = $(this).attr('data-back-delay');7 var back_speed = $(this).attr('data-back-speed');8 var loop = $(this).attr('data-loop');1 jQuery(document).ready(function (jQuery) { 2 jQuery('.typed_perview_div').each(function () { 3 var strings = jQuery(this).attr('data-strings').split(','); 4 var speed = jQuery(this).attr('data-speed'); 5 var delay = jQuery(this).attr('data-delay'); 6 var back_delay = jQuery(this).attr('data-back-delay'); 7 var back_speed = jQuery(this).attr('data-back-speed'); 8 var loop = jQuery(this).attr('data-loop'); 9 9 if (loop == 'yes') 10 10 loop = true … … 12 12 loop = false; 13 13 14 var cursor = $(this).attr('data-cursor');14 var cursor = jQuery(this).attr('data-cursor'); 15 15 if (cursor == 'yes') 16 16 cursor = true … … 18 18 cursor = false; 19 19 20 var cursor_char = $(this).attr('data-cursor-char');20 var cursor_char = jQuery(this).attr('data-cursor-char'); 21 21 22 $(this).typed({22 jQuery(this).typed({ 23 23 strings: strings, 24 24 typeSpeed: parseInt(speed), -
typed/trunk/readme.txt
r1331548 r1335209 3 3 Tags: typed, animate string, typing, typing effect, typewriter effect, typed effect, typed.js, js, animate, animation 4 4 Requires at least: 3.0 5 Tested up to: 4. 35 Tested up to: 4.4 6 6 Stable tag: 4.2 7 7 License: GPLv2 or later … … 46 46 = 1.1.0 = 47 47 * Adding option to select font family. 48 49 = 1.1.1 = 50 * Fixing issure related to jQuery conflicts. 51 * Fixing issue of using single/double quotes on the strings -
typed/trunk/typed.php
r1331548 r1335209 3 3 Plugin Name: Typed 4 4 Description: Typed Plugin created based on "typed.js" a jQuery plugin that types. Enter in any string, and watch it type at the speed you've set, backspace what it's typed, and begin a new sentence for however many strings you've set. 5 Version: 1.1. 05 Version: 1.1.1 6 6 Author: zonnix 7 7 Author URI: http://zonnix.net … … 336 336 update_post_meta($post_id, 'font_weight', $_POST['font_weight']); 337 337 338 if (isset($_POST['typed_strings'])) 339 update_post_meta($post_id, 'typed_strings', $_POST['typed_strings']); 340 338 if (isset($_POST['typed_strings'])){ 339 $_POST['typed_strings'] = array_map( 'esc_attr', $_POST['typed_strings'] ); 340 update_post_meta($post_id, 'typed_strings', esc_attr($_POST['typed_strings'])); 341 } 342 341 343 if (isset($_POST['type_speed'])) 342 344 update_post_meta($post_id, 'type_speed', $_POST['type_speed']);
Note: See TracChangeset
for help on using the changeset viewer.