Ciao a tutti,
sto cercando di usare la libreria jquery zeroclipboard per copiare negli appunti del testo contenuto in un div, ma provando e riprovando non sembra proprio funzionare, posto il codice
passando sopra al div "d_clip_button" mi compare il cursore a forma di manina, ergo lo script zeroclipboard dovrebbe vederlo, ma cliccando sopra non fa un bel niente...codice:<html> <head> <script type="text/javascript" src="http://localhost/project/js/jquery1-7.js"></script> <script src="http://localhost/project/zeroclipboard/ZeroClipboard.js"></script> <script> ZeroClipboard.setMoviePath('http://localhost/project/zeroclipboard/ZeroClipboard.swf' ); </script> </head> <body> <h1>Copia il testo negli appunti</h1> <div id="testo" name="testo" style="width: 500px; height: 200px;"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </div> <div id="d_clip_button" style="width: 100px; padding: 2px; background: #ccc;"> Copia il testo </div> <script type="text/javascript"> var clip = new ZeroClipboard.Client(); clip.setText($("#testo").val()); clip.glue('d_clip_button'); clip.setHandCursor(true); </script> </body> </html>
Qualcuno sa come fare? Grazie mille.