#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,670
    Rep Power
    171

    Javascript adds inline CSS to html !!!!


    Hello freinds;

    I use Jquery UI for datepicker and a few other things in a test website . I needed to style the drop downs so I used dropkick Jquery. But when I use drop kick drop down it strangly adds inline CSS to some elements!

    For example in the link above div class star shows as <div class="stars" style="display: none;">

    But in my code it is NOT display none! What should I do to fix this?

    Thank you
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    299
    Rep Power
    9
    Good evening zxcvbnm,

    Could you not explicitly set the display attribute with your jQuery to overwrite it?

    Kind regards,

    NM.
  4. #3
  5. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,670
    Rep Power
    171
    Originally Posted by Nanomech
    Good evening zxcvbnm,

    Could you not explicitly set the display attribute with your jQuery to overwrite it?

    Kind regards,

    NM.
    Hi; I am not sure what you mean. Please explain.
    Thanks
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    299
    Rep Power
    9
    Good morning,

    For example, when the script is running, just after the datepicker jquery sets the inline style, do something like:

    Code:
    $(function(){
         $('div.stars').css("display","block");
    });
    Kind regards,

    NM.
  8. #5
  9. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,670
    Rep Power
    171
    Originally Posted by Nanomech
    Good morning,

    For example, when the script is running, just after the datepicker jquery sets the inline style, do something like:

    Code:
    $(function(){
         $('div.stars').css("display","block");
    });
    Kind regards,

    NM.
    DOh it worked. Thank you very much.
    Last edited by zxcvbnm; June 16th, 2013 at 11:07 PM.
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    299
    Rep Power
    9
    Good morning,

    No problem, glad you got it working now.

    Kind regards,

    NM.

IMN logo majestic logo threadwatch logo seochat tools logo