[eluser]JoostV[/eluser]
Hi there,
How can I make a jQuery eventhandler call a function from a CI Model?
I would like to call the following function automatically when a user closes the browser window. (the functions saves the user's moderations)
Code:
$this->articles->save($id);
jQuery
$(window).unload seems to be the perfect eventhandler for this task.
Code:
$(window).unload( function () { /*Do_Stuff*/ } );
But how do I make this event call my CI Model function?