When appropriate I will be publishing any code related to these shorts at sfer Solar Framework Extension Repository, all code and examples for this short can be found here.

When it comes to Jquery integration you have 2 main uses. Calling a php function from a website or calling Jquery functions from php both are done through an XMLHttpRequest

Ok so first we extend Sfer_Controller_Jquery which does all the heavy lifting

class Sfer_App_Jquery extends Sfer_Controller_Jquery {

    /**
     *
     * Sets the data as an array which gets converted to json
     * Example then outputs one of the values
     *
     */

    public function actionBlah() {
        $this->_setData(array('a' => 1, 'b' => 2));
    }

    /**
     *
     * Uses the jquery sfer library to push javascript
     * transformations directly to the page
     *
     */

    public function actionEffects() {
        $attribs = array();
        $attribs['class'] = 'large';
        $this->attr($attribs);
        $this->show();
        $this->addClass('green');
        $this->Script('alert("Hello")');
    }
}

Your pages will need to load the sfer_jquery.js javascript library.

The following calls the blah function and references the json returned to do an alert based on the values provided from php

<a href="#" onClick="$.getJSON('/jquery/blah', { handler: 'json' }, function(json) { alert(json.a)})">Test 1</a>

This one calls the effects function which passes back a list of effects to jquery

<div id="test2" style="display: none;"><B>I was hidden!</B></div>
<a href="#" onClick="$('#test2').pjq('/jquery/effects')">Test 2</a>