Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
460
Loading Styles
posted

Hi,

I am using $.ig.loader to dynamically load resources on the webpage and then I take advantage of igButton to style some of the buttons. The problem is that there is a noticeable lag between when the button first appears in the browser and when the style is applied, yielding unwanted user experience. Can I reference the CSS directly and style the button in HTML? Can you provide an example? Or is there a better way to approach this (maybe make the button invisible by default)?

Thank you,

Daniel

Parents
No Data
Reply
  • 2735
    Suggested Answer
    posted

    Hello Daniel,

    It's good approach to make button invisible as you suggest.

    You can build them at run-time as well.

    Here is example code:

    $.ig.loader(function () {

    $("<button id=\"myButton\"></button>").appendTo("body");

    $("#myButton").igButton();

    });

    Regadrs,

    Stanimir Todorov

Children