How to add !important in position:absolute using jQuery.css() function?

Vikram Anand Bhushan

I know this is very silly question but I am stuck . I have been trying to add the position:absolute !important using JQUERY function .CSS() but I found out that it is not happening .

my script is something like this .

$(document).ready(function(){
    var winSize = $('#outerPage').height();
    alert(winSize);
     setTimeout(function () {
    //$('#at4m-mobile-container').addClass('bottom');
    $('body div.at4m-dock').css("top",winSize);
    $('body div.at4m-dock').css({"position":"absolute","font-size":"200% !important"});
    $('body div.at4m-dock-toggle').css("top",winSize);
    }, 7500);  

});

Please give me some suggestion

Thanks and regards

laaposto

jQuery is not understanding the !important attribute.

You can use attr()

Try:

 $('body div.at4m-dock').attr('style', 'font-size: 200% !important;position:absolute !important;');

DEMO

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to position a label using css relative to an absolute positioned input box

From Dev

How to achieve this style in css without using position:absolute?

From Dev

how to remove position absolute with jquery?

From Dev

css add two div with absolute position in container

From Dev

Positioning two blocks in absolute position for desktop and relative position for mobile using CSS or Jquery

From Dev

Positioning two blocks in absolute position for desktop and relative position for mobile using CSS or Jquery

From Dev

How to position the element using absolute position?

From Dev

using css rotate with HTML absolute position

From Dev

Apply position absolute style using JavaScript / jQuery

From Dev

jQuery .on('click') issues when using position absolute

From Dev

how to set css position absolute in hover state

From Dev

How to position absolute in scrollable area? (Css)

From Dev

how to position a div below an absolute div in css

From Dev

how to set css position absolute in hover state

From Dev

jQuery hide() on click function does not work if using HTML5 data attribute in absolute position

From Dev

jQuery hide() on click function does not work if using HTML5 data attribute in absolute position

From Dev

CSS: Position child indepently from parent without using position:absolute

From Dev

How to fix a footer at bottom using absolute position?

From Dev

"position:absolute" usage in CSS

From Dev

CSS: absolute position and relative position

From Dev

How to add 10 pixels to a dynamic top position in CSS using SASS

From Dev

Using Jquery wrap function with absolute placed element

From Dev

CSS : How to add an absolute div to a scrollable background?

From Dev

CSS drop down menue using absolute positioning with a left:auto position

From Dev

CSS - Align div in bottom of screen without using position: absolute

From Dev

How to change css position left to right using jquery?

From Dev

How to change css position left to right using jquery?

From Dev

Fade and translate the "position:absolute" element from top to bottom using jquery

From Dev

jQuery scroll left is not working when using position absolute?

From Dev

Position Fixed / Absolute menu using jquery to sit in middle of section

Related Related

  1. 1

    How to position a label using css relative to an absolute positioned input box

  2. 2

    How to achieve this style in css without using position:absolute?

  3. 3

    how to remove position absolute with jquery?

  4. 4

    css add two div with absolute position in container

  5. 5

    Positioning two blocks in absolute position for desktop and relative position for mobile using CSS or Jquery

  6. 6

    Positioning two blocks in absolute position for desktop and relative position for mobile using CSS or Jquery

  7. 7

    How to position the element using absolute position?

  8. 8

    using css rotate with HTML absolute position

  9. 9

    Apply position absolute style using JavaScript / jQuery

  10. 10

    jQuery .on('click') issues when using position absolute

  11. 11

    how to set css position absolute in hover state

  12. 12

    How to position absolute in scrollable area? (Css)

  13. 13

    how to position a div below an absolute div in css

  14. 14

    how to set css position absolute in hover state

  15. 15

    jQuery hide() on click function does not work if using HTML5 data attribute in absolute position

  16. 16

    jQuery hide() on click function does not work if using HTML5 data attribute in absolute position

  17. 17

    CSS: Position child indepently from parent without using position:absolute

  18. 18

    How to fix a footer at bottom using absolute position?

  19. 19

    "position:absolute" usage in CSS

  20. 20

    CSS: absolute position and relative position

  21. 21

    How to add 10 pixels to a dynamic top position in CSS using SASS

  22. 22

    Using Jquery wrap function with absolute placed element

  23. 23

    CSS : How to add an absolute div to a scrollable background?

  24. 24

    CSS drop down menue using absolute positioning with a left:auto position

  25. 25

    CSS - Align div in bottom of screen without using position: absolute

  26. 26

    How to change css position left to right using jquery?

  27. 27

    How to change css position left to right using jquery?

  28. 28

    Fade and translate the "position:absolute" element from top to bottom using jquery

  29. 29

    jQuery scroll left is not working when using position absolute?

  30. 30

    Position Fixed / Absolute menu using jquery to sit in middle of section

HotTag

Archive