diff --git a/README.md b/README.md index a1b862c..abd1248 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,16 @@ minimal chrome. $.popupWindow('http://www.google.com', { height: 300, width: 200 }); ``` +### Simple Example with Object as Parameter + +Another option is to call `popupWindow` with a single object that contains a url +key and any other settings. This is functionally the same as the above example +and is only a stylistic difference. + +``` +$.popupWindow({ url: 'http://www.google.com', height: 300, width: 200 }); +``` + ### More Examples There are more [examples] to look at as well. diff --git a/example.html b/example.html index 610e0b6..1547a02 100644 --- a/example.html +++ b/example.html @@ -28,6 +28,14 @@ } }); }); + + $('.example-objectapi').on('click', function(event) { + event.preventDefault(); + $.popupWindow({ + url: 'http://google.com' + }); + }); + }) @@ -41,6 +49,7 @@