Olivier percebois-Garve wrote:
>
> Looks smooth to use and interesting.
> can you explain what are the params you pass to fetch ?
>
Since the backend is written in PHP/or whatever scripting language is
supplying the data, you can set it up to pass/receive whichever parameters
fit your application.
Any tag inside of the ifM_content div is treated as a menu link. If that
link starts with http or https it treats it as a normal link and opens the
requested page, if the link starts with fetch:// it treats it as a sub-menu
request.
In the example page, I am passing a javascript object in that link:
ie:
fetch://{'current':2,'previous':1,'apiKey':'valuehere','client':'activeSpotLight'}
The parameters in the example are:
- Current -> The requested tile
- Previous -> The tile the request was made from
- apiKey & client -> Used to control and limit client access
Those paramters are then appended to the url paramter that is setup when the
plugin is declared. (The params field defines the params for the first tile)
ie:
jQuery('div#menu').fastFind(
{
url: 'parser_script.php',
params: {
'current':1,'previous':false,'apiKey':'bd51b0648d268122996b9e68cfd86175' }
});
If you look at the parser script (on the plugin page I sent), you'll see
that it simply returns a block of xhtml markup which is put into the next
tile and scrolled into view. When you click "Back" or "Home" it simply
deletes all tiles to the right of the displayed tile.
Note: There are some versions of jQuery that apparently have a bug with the
ajaxstart/ajaxstop methods that will keep the spinning icon from
diisplaying, if this happens to you simply update to the latest version.
Jeffrey
--
View this message in context:
http://www.nabble.com/New-Plugin%3A-Ajax-Popup-Menu-%28still-under-development%29-tf2763488.html#a7711380
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/