Jquery blockui positioning

I use blockui to create some forms on my site, but for some reason, the blockui element is located at about 20-30 pixels at the bottom of the screen. I tried using docs (jquery blockui options for v2) to change it with this code:

$.blockUI({css: {top : '10px'}}); 

But it just yawned in me in the universe with a mocking look and did nothing. The default value, again, for documents, is on top: 40%. I do not want to destroy all blockui css, only reset top positioning.

+4
source share
2 answers

I use this and the download message is placed in the upper right corner. Just play with css.

Hope this helps.

Rob

 $.blockUI({ message: '<img src="_assets/images/loading.gif" /><span style="margin-left:5px; font-family:arial;">Loading...</span>', fadeIn: 700, fadeOut: 700, timeout: 1000, showOverlay: false, centerY: false, css: { width: '150px', top: '10px', left: '', right: '10px', border: 'none', padding: '5px' } }); 
+9
source

The documentation provides an example:

 $.blockUI({ css: { border = '5px solid red'} }); 

So, I would try this:

 $.blockUI({ css: {top = '10px'}}); 

Use the equal sign (=) instead of the second colon. Hope this helps!

0
source

Source: https://habr.com/ru/post/1337820/


All Articles