diff --git a/samples.html b/samples.html new file mode 100644 index 0000000..414977a --- /dev/null +++ b/samples.html @@ -0,0 +1,118 @@ + + + + + +Samples jQuery Plugin stringToSlug | Leo Caseiro + + + + + + + + + + +
+

StringToSlug Demo

+

Change: +

Preview: change-the-content-of-this-field-and-view-the-text-with-red-background-preview

+
+ +
+

Default Usage:

+
+ /** + * Default Events: Blur, KeyUp e KeyDown: + * Default Get Put: #permalink + * Default Space Replacement: - (hiphen) + */ + + $(document).ready( function() { + $("#string").stringToSlug(); + }); +
+
+
+
+ +
+

The values Default at Plugin Usage:

+
+ $(document).ready( function() { + $("#title").stringToSlug({ + setEvents: 'keyup keydown blur', + getPut: '#permalink', + space: '-' + }); + }); +
+
+
+ +
+

Other(s) Event(s) Usage:

+

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" + + ); + }); +
+
+
+
+ +
+

Other Get Put Preview Usage:

+
+ $(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" + + ); + }); +
+
+
+
+ +
+

Replace hiphen by other char Usage:

+
+	$(document).ready( function() {
+		//Replace by underscore
+		$("#input[name=string]").stringToSlug({
+			space: "_"
+		);
+	});
+	
+
+

+jQuery Plugin StringToSlug create by @leocaseiro + + \ No newline at end of file