Textpattern plugin: dub_if_ajax Demo

Using the fabulous jQuery Javascript library. (P.S. I need a good syntax highlighting plugin; ako_syntax isn't flying)

The Demo

The Code

<script type="text/javascript" src="/javascript/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $('.ajaxLoad').click(function() {
    $('#replaceMe').load("<txp:permlink />") );
  });
});
</script>

<txp:dub_if_ajax>
This page <strong>was</strong> requested with XMLHttpRequest! Sweet!
<txp:else />
This page was <em>not</em> requested with XMLHttpRequest. <a href="#" class="ajaxLoad">Load it below using Ajax</a>
<p id="replaceMe"></p>
</txp:dub_if_ajax>



Comment on this

Commenting is closed for this article.