+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / jQuery + HTML5 within a widget/module/page, possible? I'm having issues.

jQuery + HTML5 within a widget/module/page, possible? I'm having issues.

3 posts, 1 answered
  1. Steve
    Steve avatar
    31 posts
    Registered:
    03 May 2011
    10 Apr 2013
    Link to this post
    Using version 5.0

    The short version is that we have a client who uses Sitefinity, for whom we programmed a mobile application for using PhoneGap to build, jQuery + HTML5 to code. The task at hand is to incorporate the existing project, into a Sitefinity page using the code we've already written. I can do without the HTML5, but when I add all the .JS references in the template editor (jQuery, CustomJS) it doesn't seem like my jQuery is actually firing (because nothing does anything it should) and I'm beginning to think that it's more trouble than it's worth because nothing I try to do with Sitefinity comes easily. 

    I have all the JavaScript set to load into the HEAD of the document, as I did in my existing project outside of Sitefinity. I can see the script entries when previewing the template and viewing the source, but they don't seem to be firing and I have no idea what the issue could be!

    http://www.sitefinity.com/blogs/gabesumner/posts/gabe-sumners-blog/2011/09/01/how_to_use_jquery_and_other_javascript_libraries_in_sitefinity is what I was using for reference if that helps. 


    Thanks!
  2. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    11 Apr 2013 in reply to Steve
    Link to this post
    Hey Steve,

    Any chance you could share the code of your template to see how/where you're including the javascript references?

    You say you're using the Template Editor, which would only allow JS widgets to be dropped, yet you refer to Gabe's post which uses code.

    Does Firefox/Chrome's console report any error messages? In the network tab of Chrome/Firefox do you see the script-files being loaded?

    Jochem


    Answered
  3. Steve
    Steve avatar
    31 posts
    Registered:
    03 May 2011
    11 Apr 2013 in reply to Jochem Bökkers
    Link to this post
    Jochem,

    I am extremely new to the sitefinity environment so please forgive me in advance for any confusion or ignorance on my end.

    That being said, I was originally going to try using the coding method from Gabes post, until I discovered that I could add references to .js files from the Sitefinity GUI. 

    >Any chance you could share the code of your template to see how/where you're including the >javascript references?

    This is something that I should be able to answer, but because I'm still pretty new, I'm not sure which file on the backend would have the code for me to look at/edit manually, hence why I'm trying to do everything via the SF GUI. 


    >Does Firefox/Chrome's console report any error messages? In the network tab of Chrome/Firefox >do you see the script-files being loaded?

    You know what's really funny? It works today. I just tried loading the template I had created, and toying around with it as usual and it works. So, I guess my question isn't so much answered as non existent? Whatever, I'm just happy that it works! 

    Thanks Jochem!




3 posts, 1 answered