Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Screen name:
fedor.indutny
About Me:
Javascript, Java, Python, PHP coder.
Website:
http://habrastat.ru/
fedor.indutny's Profile
1
Posts
7
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
jQuery.tpl
[0Replies]
10-Apr-2010 04:47 AM
Forum:
Developing jQuery Core
Hi all!
Impressed by micro-template engine written by John Resig, I've been created this templates variant:
Few examples:
// Simple
{% for (var i=0;i<100;i++) { %}
<div id="{%= i %}"></div>
{% } %}
// With shorthands
{%@ func(abc) { %}
{%= abc %}
{% } %}
{% func("hello world!"); %}
// Other features
{%@ button(value) { %}
{%= $('<button>'+value+'</button>').click(function() {
alert(value);
}) %}
{% } %}
{% button("text"); %}
Also this engine can have named templates and can easily call it from other template (see demos).
And my templates can have optional variables, so you won't see errors like: "undefined variable VALUE" (with some restrictions, of course).
So link to the
plugin page
,
demo site
,
uncompressed file
,
compressed file
.
Thanks for reading, will be glad to see your opinion here in replies
«Prev
Next »
Moderate user : fedor.indutny
Forum