understanding Jquery template

后端 未结 1 612
北恋
北恋 2020-12-06 06:58

I am reading and trying to understand a Jquery template example.



        
1条回答
  •  不知归路
    2020-12-06 07:54

    This contains a reference to a template named "titleTemplate", a template which has not yet been defined:

    
    

    This line defines that missing template:

    $.template( "titleTemplate", "${Name}" );
    

    It is another way of saying

    
    

    In essence the example shows that you can define templates in two ways

    • declaratively in the HTML source code, as
提交回复
热议问题