Subversion Repositories DevTools

Rev

Rev 6589 | Rev 6610 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6589 Rev 6592
Line 345... Line 345...
345
        )
345
        )
346
        .on("dblclick", myClipHandler);
346
        .on("dblclick", myClipHandler);
347
 
347
 
348
});
348
});
349
 
349
 
-
 
350
// Add a clipThis handler to each element with a clipThis class
-
 
351
// Will copy the text of the element to the clipboard
-
 
352
// Add dynamically so that it will be invoked on newly created elements
-
 
353
$( document ).on('click', '.clipThis', function(event){
-
 
354
    var txt = $(this).eq(0).text();
-
 
355
    vixTextToClipBoard(txt, {note : "Copied to Clipboard", duration : 1000});
-
 
356
});
-
 
357
 
350
// Copy text to clipboard
358
// Copy text to clipboard
351
function vixTextToClipBoard(txt, options){
359
function vixTextToClipBoard(txt, options){
352
    if ( txt == null ) {
360
    if ( txt == null ) {
353
        return;
361
        return;
354
    }
362
    }