50 likes | 210 Views
NotesIn9 Adding a jQuery plugin to an XPage. Dr. Mark Roden. Marky…. http://www.xomino.com. What will we be doing?. Downloading our jQuery Plugin Adding it to our database Creating a viewPanel Testing the plugin with Firebug Applying the plugin to our XPage. Questions?.
E N D
NotesIn9Adding a jQuery plugin to an XPage Dr. Mark Roden
Marky….. http://www.xomino.com
What will we be doing? • Downloading our jQuery Plugin • Adding it to our database • Creating a viewPanel • Testing the plugin with Firebug • Applying the plugin to our XPage
Questions? Mark Roden Comments/Questions/Suggestions http://www.xomino.com/nin9_trunk8
Code snippets <xp:this.resources> <xp:scriptsrc="js/trunk8.js" clientSide="true"></xp:script> <xp:scriptsrc="js/jquery-1.7.1.min.js" clientSide="true"></xp:script> </xp:this.resources> <script> XSP.addOnLoad(function(){ $("#[id$='viewPanel1'] trtd:nth-child(3)").trunk8({ fill: '<a href="#"> read more </a>', //this is what is inserted into the text as placeholder lines: 3, //the number of lines of orginal text displayed side: 'right', //the placement of the "read more" left center right tooltip: true, //show a tooltip of the original text width: 'auto' // style the final text to fit the container. }); }) </script>