As someone new to jQuery, I am currently facing a challenge with accessing a variable defined inside a jQuery block from a regular function. Despite my attempts, I have been unsuccessful in accessing it. Can anyone guide me on how to do this?
<script language="javascript>
$(function()
{
.......
.......
.......
var api = pane.data('jsp');
var current_location = api.getContentPositionX();
}
function change_title(t_index) {
alert("print="+$.current_location);
window.location.href="page.php?p="+$.current_location);
}
I am looking to retrieve the value of $.current_location.
Any assistance would be highly appreciated. Thank you!