For some specific requiment, I had to build a nested accordian working with views, in this tutorial, I am not using views but just describing the html, js and css to describe how I acieved it.

Its not the default behaviour of the JQuery to call a PHP function directly, but this can be done calling a page cotaining PHP funtion in it.

But here is how to do it in DRUPAL.

We can use hook_menu to do this magic. Value in 'page callback' will be used as call back function in jquery.

Subscribe to RSS - JQuery