Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6951963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:17:13+00:00 2026-05-27T14:17:13+00:00

I want to perform an if check with in jquery template: jquery template <script

  • 0

I want to perform an if check with in jquery template:

jquery template

<script id="CardWallItem" type="text/x-jquery-tmpl">
    <div id="lc${ProductId}" class="card">
        <input class="ItemId" type="hidden" value="${CardId}"/>
        <a href="" class="oCloseButton" onclick="return $$.laneItems.deleteLane(this);">x</a>
        if($.parent().find('.ItemId').val() == ${EntityId}){
        <p class="text" onclick="return $$.laneItems.editCard(this);">${Desc}</p> 
        <div class="edit bg" style="display:none;">
            <input class="editval" type="text" maxlength="20" />
            <a class="button" href="" onclick="return $$.laneItems.saveTitle(this);">Save</a> 
        </div>
        }
    </div>
    <br /><br />
</script>

and as you can see the if check in between, this one:

if($.parent().find('.ItemId').val() == ${EntityId}){
            <p class="text" onclick="return $$.laneItems.editCard(this);">${Desc}</p> 
            <div class="edit bg" style="display:none;">
                <input class="editval" type="text" maxlength="20" />
                <a class="button" href="" onclick="return $$.laneItems.saveTitle(this);">Save</a> 
            </div>
            }

as the output of this is that it is printing whole if statement on page. So can anyone please tell me what I should do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:17:14+00:00Added an answer on May 27, 2026 at 2:17 pm

    JQuery template itself is any HTML markup, along with any of a set of template tags which enable some very rich scenarios for creating data-driven UI. The current set of tags that are supported in jQuery templates are:

    - ${...}: Evaluate fields or expression
    - {{each ...}}...{{/each}}: Iterate without creating template items
    - {{if ...}}...{{else ...}}...{{/if}}: Conditional sections
    - {{html ...}}: Insert markup from data
    - {{tmpl ...}}: Composition, as template items
    - {{wrap ...}}...{{/wrap}}: Composition, plus incorporation of wrapped HTML
    

    And for more details and example please visit here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an INPUT element of the TEXT type and I want to perform
I want to perform a simple slide motion on an HTML element. JQuery is
I am using jquery's change() to perform actions when SELECTs of a certain class
While developing a web application I want to perform certain validation check and only
In my activity class i want to perform a series of long calculations that
I want to perform this date check: The date entered by the user should
Basically I want to perform this check: var done = <?= $test_details['done_test'] ?>; if(typeof
In a JS function using setIntervall, I want to perform a jquery animation every
I have this html <div> <input type=radio name=erp_report_type value=customerinvoice required> <label for=>Customer Invoice</label> <input
I want to perform a check is there an entry for each of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.