You need to sign in to do that
Don't have an account?
renuami
help with backbone in visualforce
Folks
Hope someone can help me get my first backbone app working
below is the snippet of code that i have written in visualforce using backbone . unfortunately i dont see the output when i access te VF page. But for the same code i see the out put when i run it using regular html.
Hello World text should be displayed when i run this. but no idea whats wrong with this code.
can someone advise?
<apex:page standardStylesheets="false" applyBodyTag="false" contentType="text/html" controller="ParsingJSON"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script> <script src="http://ajax.cdnjs.com/ajax/libs/underscore.js/1.1.6/underscore-min.js"></script> <script src="http://ajax.cdnjs.com/ajax/libs/backbone.js/0.3.3/backbone-min.js"></script> <script type="text/javascript"> ListView = Backbone.Force.View.extend( { //el: $('body'), initialize: function( x ) { //alert('My first Backbone'); _.bindAll(this, 'render'); this.render( x ); }, render: function( x ) { //alert('My first Backbone'); x.append("<ul> <li>hello world</li> </ul>"); //el.append("<ul> <li>hello world</li> </ul>"); } }); var listView = new ListView($('#temp')); </script> </head> <body> <div id="temp" style="color:#0000FF"> <h3>This is a heading</h3> <p>This is a paragraph.</p> </div> </body> </apex:page>
Hello experts --- any advise????
Please help.