Disqus comment count in jQuery UI Tab title -
i'm trying disqus comment count show in tab title of jquery ui tab.
disqus says:
append #disqus_thread href attribute in links. tell disqus links , return comment count. example:
<a href="http://foo.com/bar.html#disqus_thread">link</a>.
since link in jquery tab looks this:
<a href="#tabs-2">comments</a>
i've tried adding #disqus_thread , comment count show breaks tab functionality.
how can add #disqus_thread href , not break jquery tab? full code looks this:
<div id="tabs"> <ul> <li><a href="#tabs-1"><span>info</span></a></li> <li><a href="#tabs-2"><span>comments</span></a></li> </ul> <div id="tabs-1"> <p>lorem ipsum</p> </div> <div id="tabs-2"> <p>lorem ipsum</p> <div id="disqus_thread"></div> <script type="text/javascript"> // contains disqus javascript </script> </div> </div>
the comment counting script inflexible looks anchor tags have 'disqus_thread' hash. in case, you'll need use api comment counts present them differently.
this answer has example of how this: showing disqus comment count in div or span - not <a href>
keep in mind you'll want make disqus api call server-side, cache it, , use example read cached file. besides loading faster on site, keep going on 1000 requests/hour limit.
Comments
Post a Comment