For changing my content I have the following script:
$(document).ready(function(){
var $active = 'welcome';
$('div#con'+$active).show();
function hideall($execpt){
if($active != $execpt){
$('div#con'+ $active).slideUp('slow');
show($execpt);
};
};
function show($div){
$('div#con'+$div).slideDown('slow');
$active = $div;
};
$('ul#menulist li').click(function() {
hideall($(this).attr('id'));
});
});
When I click an item in the menulist the current div silde up and the div corresponting to the menu will slide down.
The page that is active at that moment is stored in the variable $active.
Now I've installed
jeditable for changing the content dynamicly on my website.
The problem now is I want to send the current page with the data of my jeditable, so I added $active to the ajax data send by the jeditable.js. Now when executing this script firebug returns the following error:
'$active' is not defined.
How can I get the variable $active working in the jeditable.js ?
I also tried to send $active togheter with the settings.
$('.edit').editable('save.php', {
indicator : 'Save...',
tooltip : 'Click to edit...',
pages : $active
});
But now $active always has the value welcome because it takes the startup value and never changes when I chose another page.
I hope you guys can help me.
Thanks in advance,
Greetz Dietger