Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • siva kumar 120 posts 209 karma points
    Apr 08, 2013 @ 09:12
    siva kumar
    0

    how to add js and css files in umbraco for a control in umbraco 4.7.1.1?

    i created a datepicker control in .net by using jquery and css, it is not working in umbraco what changes  i need to do to enable the jquery and css files to  the control working?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 08, 2013 @ 09:31
    Dennis Aaen
    0

    Hi Siva,

    how you are linking your css and script files now. Can you give an example of what, then I will try to help you.

    Looking forward to hear more.

    /Dennis

  • siva kumar 120 posts 209 karma points
    Apr 08, 2013 @ 14:26
    siva kumar
    0

    <umb:CssInclude ID="CssInclude2" runat="server" FilePath="/jquery-ui-timepicker-addon.css"  PathNameAlias="UmbracoClient" />
    <umb:CssInclude ID="CssInclude1" runat="server" FilePath="/jquery-ui.css"   PathNameAlias="UmbracoClient" />
          <umb:JsInclude ID="JsInclude3" runat="server" FilePath="~/jquery-ui-timepicker-addon.js"  />
            <script type="text/javascript">
                         $(function () {
            $('#l1').timepicker();
        }); 
       

        </script>

    i am calling timepicker() method in the timepicker addon.js using textbox id.but the timepicker ui not showing?

  • siva kumar 120 posts 209 karma points
    Apr 08, 2013 @ 14:30
    siva kumar
    0

    hi dennis

    how can i solve above problem

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 08, 2013 @ 14:37
    Dennis Aaen
    0

    Hi Siva,

    When i work with scripts and css in umbraco I´m using the folders, that comes with the Umbraco installation, if you do the same, so you put your css files is in the css folder, and your javascript files  in the script folder I think you should be able to do some thing like this.

    <umb:CssInclude ID="CssInclude2" runat="server" FilePath="/css/jquery-ui-timepicker-addon.css"  PathNameAlias="UmbracoClient" />
    <umb:CssInclude ID="CssInclude1" runat="server" FilePath="/css/jquery-ui.css"   PathNameAlias="UmbracoClient" />
       <umb:JsInclude ID="JsInclude3" runat="server" FilePath="/scripts/jquery-ui-timepicker-addon.js"  />
            <script type="text/javascript">
                         $(function () {
            $('#l1').timepicker();
        }); 
       
        </script>

    The slash just tells it to start from the root of your site.

    I hope this can helps you.

    /Dennis

     

Please Sign in or register to post replies

Write your reply to:

Draft