Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » How do I…?
  3. » Query Times vs. JS

#1 2007-04-10 02:17:23

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Query Times vs. JS

What kind of difference would one be looking at for these kinds of calls/scripts? Timewise?

The original: (from a form)
bc. <li <txp:zem_nth step=1 of=2>class=“odd”</txp:zem_nth>>
<p class=“post-date”><txp:posted format=”%b/%d/%y” /></p>
<h3 class=“post-title”><txp:permlink><txp:title /></txp:permlink></h3>
</li>

The new: also in a form:
bc. <li>
<p class=“post-date”><txp:posted format=”%b/%d/%y” /></p>
<h3 class=“post-title”><txp:permlink><txp:title /></txp:permlink></h3>
</li>

With this in the head:
bc.. <script type=“text/javascript”>
// <![CDATA[
$(document).ready(function() { $(“ul#tag-list li:nth-child(odd)”).addClass(“odd”); });

// ]]>
</script>


Offline

#2 2007-04-10 07:01:07

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Query Times vs. JS

The 2nd alternative’s time consumption largely depends on the client’s current state of technology (browser make & model, operating system, cpu horse power, sea tide, moon phase,…), so all assumptions would invalidate themselves immediately without further specs on that parts.

My personal advice: Unless you are colouring a thousand rows, don’t spend your mind on that.

Offline

#3 2007-04-10 17:55:26

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Offline

  1. Index
  2. » How do I…?
  3. » Query Times vs. JS

Board footer

Powered by FluxBB