This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
README.markdown | Wed Jan 28 11:31:05 -0800 2009 | |
| |
jquery.js | Wed Jan 28 11:31:05 -0800 2009 | |
| |
jquery.min.js | Wed Jan 28 11:31:05 -0800 2009 | |
| |
jquery.pageselect.js | Wed Jan 28 11:31:05 -0800 2009 | |
| |
jquery.pageselect.min.js | Wed Jan 28 11:31:05 -0800 2009 | |
| |
test.html | Wed Jan 28 11:31:05 -0800 2009 |
README.markdown
jQuery PageSelect Plugin
This is a plugin for jQuery designed to allow cross-browser handling of "page selection," that is selecting HTML on the page (not in a textarea). At the moment this is an extremely unready and unfeatured implementation that simply creates a custom 'pageselect' event that one may listen to in order to get the currently selected text.
Usage
The limited usage right now is a $.getSelection() utility method and a 'pageselect' event. How to use each is detailed below:
alert($.getSelection()); // Display the current selection in an alert box.
// Alert with the currently selected text whenever
// text inside the '#content' element is selected.
$('#content').bind('pageselect', function(event, selection) {
alert(selection);
})
Future
I aim to expand this plugin to do much more than simply grab the currently selected text. In the future this plugin should be able to:
- Grab the actual HTML fragment that is currently selected.
- Wrap the selected HTML with more HTML (for highlighting and other purposes)
- Make use of other features of the W3C Range







