I've got a pretty confounding issue pertaining to Magento, jQuery, and jQuery Block UI. You know the navigation links that appear for customers when they access their customer account? The ones that are created via XML?
Well, I'm trying to target two of them specifically in order to create a jQuery Block UI loading animation while the database takes its sweet time. I have jQuery and jQuery Block UI up and running and now need someway to have this message/animation/block/ajaxloader on screen from the moment the user clicks one of these specific links to the moment that everything has fully loaded. Or I could place the code on the pages I'm attempting to load so I don't have to worry about where they're coming from. However, I'm uncertain of how I might accomplish this through jQuery. I am not currently making an ajax call to load the data (and I understand that this may be simpler if I was to use ajax).
Any ideas?
UPDATE:
Thanks @JaredKipe, but it doesn't seem to accomplish my goal. Here is my placement of jQuery and Block UI within head.phtml as well as the code you describe.
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<?php echo $this->getJsUrl('jqueryBlockUI/jquery.blockUI.js') ?>"></script>
<script type="text/javascript">
//<![CDATA[
var $j = jQuery.noConflict();
//]]>
</script>
<script>
$j(function () {
$j('.block-account li:not(.current)').click(function () {
$j.blockUI();
});
});
</script>
<?php echo $this->getCssJsHtml() ?>
This is what the controller looks like to load the page.
public function orderhistoryAction()
{
if ($this->_getCustomerSession()->isLoggedIn()) {
$this->loadLayout();
$this->renderLayout();
} else {
$this->_redirect('customer/account/login');
}
}
Obviously the block is being loaded from a layout xml file, however I'm unsure how I can display jQuery Block UI (or some other kind of loading message) while the block is being loaded/created.
Again, I am very new to the Magento framework. Thanks for any help anyone can offer!