function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Trying to implement a jquery plugin into VF page



I am trying to have a jquery plugin into Vf page.

Plugin : Zclip


I have put the files required in to static resource. this plugin uses a swf file

Here is the code to use in html




Below is my VF page: I am not sure if the path i am giving for is correct in VF page. It doesnt seem to work oin VF page



<apex:page standardController="Account" sidebar="false" showHeader="false" id="page1">
 <apex:includeScript value=""/>
<apex:includeScript value="{!URLFOR($Resource.zclip, 'jquery.zclip.min.js')}"/>

     <script type="text/javascript">
         var j$ = jQuery.noConflict();
path:"{!URLFOR($Resource.zclip, 'ZeroClipboard.swf')}",  // i am not sure if this is the right way to do it
<tr> <td>Account Name :</td> <td> <apex:outputField value="{!}" id="txtaccname1"/> </td><td><input type="button" id="copyname1" class="btn" value="Copy to Clipboard" /></td></tr>

 any ideas why its not working

  • $(document).ready(function(){
  • $('a#copy-description').zclip({
  • path:'js/ZeroClipboard.swf',
  • copy:$('p#description').text()
  • });
Richa KRicha K

- Go to the static resources through set up --> develope

- Open the SWF static resource file (Click 'View File')

- Copy the link location and use it like;


<apex:page standardController="Account" sidebar="false" showHeader="false" id="page1">
<script src=""></script>
<script src=""></script>

<script type="text/javascript">
path: "",
copy:function(){return $('#copyname1').val;}



Also, remove the table that you have used, it will cause error. 


Use just '$' and not  'j$'


Shailesh Patil.




For Path:


Is the file the only file in the archive/static resource?


If so use:




for the jquery selectors, you have to have every parent item in your page tagged with an id to use the standard # notation....


Try using




instead when you do not have every parent node tagged with an id.