Template values won't render when contained within <> of markup

I have an array that looks similar to:

var myData = [
{ hrefVal : 'mypage.php', lnkTxt : 'My Page' }
]

Then I’m using:

$.template( 'tpl_gNav', '<li><a href="/$(hrefVal)" class="nav">${lnkTxt}</a></li>' );

$.tmpl( 'tpl_gNav', myData ).appendTo( '#cGnav ul' );

I am expecting the resulting markup to be rendered as:


<li><a href="/mypage.php" class="nav">My Page</a></li>

but instead, I’m getting:


<li><a href="/[B][COLOR="#FF0000"]$(hrefVal)[/COLOR][/B]" class="nav">My Page</a></li>

I can’t seem to get any values to be displayed as attribute values within the markup. Can anyone see what I’m doing wrong?

Is it because you have hrefVal in parenthesizes instead of brackets? ie: (hrefVal) should be {hrefVal}?

wow. i’ve def been sitting in front of the computer for too long… thanks!!