diff --git a/samples.html b/samples.html new file mode 100644 index 0000000..414977a --- /dev/null +++ b/samples.html @@ -0,0 +1,118 @@ + + +
+ + +Change: +
Preview: change-the-content-of-this-field-and-view-the-text-with-red-background-preview
+++ /** + * Default Events: Blur, KeyUp e KeyDown: + * Default Get Put: #permalink + * Default Space Replacement: - (hiphen) + */ + + $(document).ready( function() { + $("#string").stringToSlug(); + }); ++
+
+ ++ $(document).ready( function() { + $("#title").stringToSlug({ + setEvents: 'keyup keydown blur', + getPut: '#permalink', + space: '-' + }); + }); ++
+
To change the events, we must insert one or more events separated by space:
++++ $(document).ready( function() { + //Only Event Blur + $("#only-blur-event").stringToSlug({ + setEvents: "blur" + ); + + //2 Events or More + //This sample, Usage Events: KeyUp and KeyDown + $("#keyup-and-keydown-events").stringToSlug({ + setEvents: "keyup keydown" + + ); + }); ++
+
++ $(document).ready( function() { + //Previem in all texarea + $("input[name=string]").stringToSlug({ + getPut: "textarea" + ); + + //Preview in all elements preview class + $("#input[name=string]").stringToSlug({ + getPut: ".class" + + ); + }); ++
+
+ $(document).ready( function() { + //Replace by underscore + $("#input[name=string]").stringToSlug({ + space: "_" + ); + }); ++