I've been using BlockUI to block the whole page, and it has been working fine like this:
$.blockUI()
but when I try to block a specific DIV (following Block UI Jquery plugin for a specific DIV ) like this
$('#my-div').blockUI()
It throws this error:
TypeError: Object [object Object] has no method 'blockUI'
I thought maybe it's a conflict with jquery's $ so I changed the $ to J with noConflict like this
var j = jQuery.noConflict(true);
...
j.blockUI(); // <--- this one works
j('#my-div').blockUI(); // <--- this one doesn't work
$.blockUI(); // <--- this one doesn't work, so $ is not used
So this rules out a jQuery conflict. So any idea what is causing this?
Thanks!!!
The documentation says that the syntax for blocking a single element is just block
not blockUI
Try
$("#my-div").block();