Skip to content

Instantly share code, notes, and snippets.

@joshbirk
Created November 17, 2011 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshbirk/1374956 to your computer and use it in GitHub Desktop.
Save joshbirk/1374956 to your computer and use it in GitHub Desktop.
This is an example of using jQote2 within Visualforce. The RemoteAction function is just a simple SOQL call.
<apex:page Controller="DataController" showHeader="false" standardStylesheets="false">
<apex:includeScript value="{!URLFOR($Resource.HTML5Util, 'jquery.min.js')}" />
<apex:includeScript value="{!$Resource.jQote2}"/>
<script type="text/javascript">
j$ = jQuery.noConflict();
j$(document).ready(
function() {
DataController.getRecords(function(result, event) {
j$('#contactList').jqoteapp('#contacts_tmpl', result);
});
}
);
</script>
<ul id="contactList">
<script type="text/x-jqote-template" id="contacts_tmpl">
<li>Contact: <%= this.Name %>, <%= this.Id %></li>
</script>
</ul>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment