Tweaked JS and CSS of mark posts plugin
parent
1e82e69c33
commit
19ee750032
1 changed files with 4 additions and 8 deletions
12
Plugins.md
12
Plugins.md
|
@ -69,14 +69,9 @@ A plugin which lets you mark particular posts so you don't forget them in your t
|
||||||
``` js
|
``` js
|
||||||
// mark posts with dbl-click
|
// mark posts with dbl-click
|
||||||
$('ol').delegate('a', 'click dblclick', function(e) {
|
$('ol').delegate('a', 'click dblclick', function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}).delegate('li', 'dblclick', function(e) {
|
}).delegate('li', 'dblclick', function(e) {
|
||||||
var li = $(this);
|
$(this).toggleClass('selected');
|
||||||
if(li.hasClass('selected')) {
|
|
||||||
li.removeClass('selected');
|
|
||||||
} else {
|
|
||||||
li.addClass('selected');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -85,7 +80,8 @@ And add this to your CSS plugin file:
|
||||||
``` css
|
``` css
|
||||||
/* mark posts with dbl-click */
|
/* mark posts with dbl-click */
|
||||||
.selected {
|
.selected {
|
||||||
border-left: 5px solid green;
|
border-left: 5px solid green;
|
||||||
|
padding-left: 3px;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Reference in a new issue