From 861bf25f96571124b68f0e451f1acb4cddc66326 Mon Sep 17 00:00:00 2001 From: kim366 Date: Sat, 17 Mar 2018 11:23:07 +0100 Subject: [PATCH] Fix readme indentation and add syntax highlighting --- README.md | 114 +++++++++++++++++++++++++++++------------------------- 1 file changed, 62 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index d99a587..3cd7b79 100644 --- a/README.md +++ b/README.md @@ -7,20 +7,28 @@ The plugin should work in IE8 and above as well as in Chrome, Safari and Firefox You can download split-pane.js and split-pane.css manually to you project or you can install with bower: - bower install split-pane +``` +bower install split-pane +``` Split panes are initiated with - $(selector).splitPane(); +```js +$(selector).splitPane(); +``` Split pane component min-height and min-width are supported, and the component size can be set programmatically with - $(selector).splitPane('firstComponentSize', 0);" +```js +$(selector).splitPane('firstComponentSize', 0);" +``` or - $(selector).splitPane('lastComponentSize', 100);" +```js +$(selector).splitPane('lastComponentSize', 100);" +``` Only pixel values are supported. @@ -28,51 +36,53 @@ Below is a basic example on how to use the plugin. Check out my [blog post](http You need to set up component widths and divider position using css, not as options to the JS splitPane function. The reason for this is that I like things to look good even **before** the JavaScript kicks in. - - - - Basic Example - - - - - - - -
-
- This is the left component -
-
-
- This is the right component - -
-
- - +```html + + + + Basic Example + + + + + + + +
+
+ This is the left component +
+
+
+ This is the right component + +
+
+ + +```