I am trying to pass a
{loadposition grabber}
custom module position and module to delay it's operation after the document has loaded. I have loaded my jquery.js file and added this script.
<script type="text/javascript">
$(document).ready(function(){
$.get('{loadposition grabber}',
function(output) {
$('#grabberDiv').html(output).fadeIn(500);
});
});
</script>
With a...
<div id="grabberDiv">Testing grabberDiv</div>
In my body. What I am trying to figure out is if this is a problem in my code here or if it is simply impossible to do without altering my module.
Joomla!'s {loadposition aModulePosition}
is meant for use in the body of an article and is replaced during page rendering by the CMS, ie. prior to the page being sent back to the browser.
So the browser (& therefore jQuery/Javascript) never sees an element called {loadposition grabber}
.
It might be better to set the default CSS for the grabberDiv
to display:none
and then update your script to work with the correct element ID.