<commit_before>WebUI-Popover
=============

A lightWeight popover plugin with jquery ,enchance the  popover plugin of bootstrap with some awesome new features. It works well with bootstrap ,but bootstrap is not necessary!


Browser compatibility: ie8+,Chrome,Safari,Firefox,Opera

## Requirement

jquery1.7+,jquery2.x

##Features
* fast,lightweight
* support more placements
* auto caculate placement
* close button in popover
* multipule popovers in same page
* different styles
* support url and iframe


##Getting Started

####Including it on your page
```html
<link rel="stylesheet" href="jquery.webui-popover.css">
...
<script src="jquery.js"></script>
<script src="jquery.webui-popover.js"></script>
```

####Use the plugin as follows:

```javascript
$('a').webuiPopover(options);
```

####Some Examples:

Create  Simplest Popover
```javascript
$('a').webuiPopover({title:'Title',content:'Content'});
```

Create  Popover by dom element data-* attribute
```html
<a href="#" data-title="Title" data-content="Contents..." data-placement="right"></a>
```
```javascript
$('a').webuiPopover();
```

Create  Popover with bottom placement
```javascript
$('a').webuiPopover({title:'Title',content:'Content',placement:'bottom'});
```

Create  Popover trigged by mouse hover
```javascript
$('a').webuiPopover({title:'Title',content:'Content',trigger:'hover'});
```

Create  inversed style Popover 
```javascript
$('a').webuiPopover({title:'Title',content:'Content',style:'inverse'});
```
Create  Popover with fixed width and height
```javascript
$('a').webuiPopover({title:'Title',content:'Content',width:300,height:200});
```

Create  Popover with close button
```javascript
$('a').webuiPopover({title:'Title',content:'Content',closable:true});
```

Create  Popover with iframe
```javascript
$('a').webuiPopover({title:'Title',url:'http://getbootstrap.com',iframe:true});
```





### default options
```javascript
{
	placement:'auto',//values: auto,top,right,bottom,left,top-right,top-left,bottom-right,bottom-left
	width:'auto',//can be set with  number
	height:'auto',//can be set with  number
	trigger:'click',//values:click,hover
	style:'',//values:'',inverse
	delay:300,//delay time of the popover, works only when trigger is 'hover'
	cache:true,//if cache is set to false,popover will destroy and recreate
	multi:false,//allow other popovers in page at same time
	arrow:true,//show arrow or not
	title:'',//the popover title ,if title is set to empty string,title bar will auto hide
	content:'',//content of the popover,content can be function
	closeable:false,//display close button or not
	padding:true,//content padding
	iframe:false,//iframe or not
	url:''//if not empty ,plugin will load content by url, 'content' option will be ignored
}
```





<commit_msg>add demo link to readme<commit_after>WebUI-Popover
=============

A lightWeight popover plugin with jquery ,enchance the  popover plugin of bootstrap with some awesome new features. It works well with bootstrap ,but bootstrap is not necessary!


Browser compatibility: ie8+,Chrome,Safari,Firefox,Opera

## Requirement

jquery1.7+,jquery2.x

##Features
* fast,lightweight
* support more placements
* auto caculate placement
* close button in popover
* multipule popovers in same page
* different styles
* support url and iframe

##Demo
[WebUI Popover Demo](http://sandywalker.github.io/webui-popover/demo/)

##Getting Started

####Including it on your page
```html
<link rel="stylesheet" href="jquery.webui-popover.css">
...
<script src="jquery.js"></script>
<script src="jquery.webui-popover.js"></script>
```

####Use the plugin as follows:

```javascript
$('a').webuiPopover(options);
```

####Some Examples:

Create  Simplest Popover
```javascript
$('a').webuiPopover({title:'Title',content:'Content'});
```

Create  Popover by dom element data-* attribute
```html
<a href="#" data-title="Title" data-content="Contents..." data-placement="right"></a>
```
```javascript
$('a').webuiPopover();
```

Create  Popover with bottom placement
```javascript
$('a').webuiPopover({title:'Title',content:'Content',placement:'bottom'});
```

Create  Popover trigged by mouse hover
```javascript
$('a').webuiPopover({title:'Title',content:'Content',trigger:'hover'});
```

Create  inversed style Popover 
```javascript
$('a').webuiPopover({title:'Title',content:'Content',style:'inverse'});
```
Create  Popover with fixed width and height
```javascript
$('a').webuiPopover({title:'Title',content:'Content',width:300,height:200});
```

Create  Popover with close button
```javascript
$('a').webuiPopover({title:'Title',content:'Content',closable:true});
```

Create  Popover with iframe
```javascript
$('a').webuiPopover({title:'Title',url:'http://getbootstrap.com',iframe:true});
```





### default options
```javascript
{
	placement:'auto',//values: auto,top,right,bottom,left,top-right,top-left,bottom-right,bottom-left
	width:'auto',//can be set with  number
	height:'auto',//can be set with  number
	trigger:'click',//values:click,hover
	style:'',//values:'',inverse
	delay:300,//delay time of the popover, works only when trigger is 'hover'
	cache:true,//if cache is set to false,popover will destroy and recreate
	multi:false,//allow other popovers in page at same time
	arrow:true,//show arrow or not
	title:'',//the popover title ,if title is set to empty string,title bar will auto hide
	content:'',//content of the popover,content can be function
	closeable:false,//display close button or not
	padding:true,//content padding
	iframe:false,//iframe or not
	url:''//if not empty ,plugin will load content by url, 'content' option will be ignored
}
```






{'fraction_non_alphanumeric': 0.1693921080696765, 'fraction_numerical': 0.004621400639886242, 'mean_word_length': 6.077987421383648, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6658299', 'n_tokens_mistral': 1820, 'n_tokens_neox': 1692, 'n_words': 484}