Ca-Phun Ung wrote:
> Klaus Hartl wrote:
>
> > So you would first add the custom attribute which then the plugin
> > could rely on. Well, then why not just alter the URL right away?
> > Something along:
> >
> > var $tabs = $('#example');
> > $('a', $tabs).attr('href', function() { return this.href.replace(/\.php
> > $/, '_ajax.php'); });
> > $tabs.tabs();
> >
> > One extra line of code, fair enough?
> >
> > --Klaus
> >
> Exactly, why not? Why does it have to be a custom attribute or another
> page? ;)

That would work fine and not to much extra code.

One such plugin that uses rel for ajax is the clueTip one (which is
probably why I thought of using it).
http://plugins.learningjquery.com/cluetip/
I am sure there are more that do as well - probably because the rel
attribute in not really used that much (until recently with
microformats).


Perhaps a bit off topic, but maybe still relevant:

I am looking at CakePHP (http://cakephp.org/) and WildFlower (http://
wf.klevo.sk/, which uses jQuery) for future sites, so would change the
view in the controller if the request is an ajax one.
Note: not tested yet.

if($_SERVER["X-Requested-With"] == "XMLHttpRequest")
{
    $this->viewPath = "ajax";
    $this->render("contentonly");
}

Reference: 
http://www.lost-in-code.com/php-code/cakephp-change-view-file-from-controller/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to