Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...JQuery in DNN4.9.0 (to 4.9.4)JQuery in DNN4.9.0 (to 4.9.4)
Previous
 
Next
New Post
8/13/2009 2:39 PM
 

I'm new to the whole JQery thing, but am learning through e-books and going through tutorials...  Anyway, my question is:

Is JQuery enabled in DNN 4.9.0 - 4.9.4 installations, or is it just supported..? I.E. Native to DNN, or just works in DNN..?
(I read on this post [link] that "Thanks goodness we added jQuery support in 4.9 and 5.0.")

If it is native:

  1. How does one call on it, both in the Text/HTML editor (if using a script) or from the ascx skin file..?
  2. Where can I find documentation in incorporating JQuery scripts into my skins?

If it's not native, but is supported:

  1. How does one call on it, both in the Text/HTML editor (if using a script) or from the ascx skin file.. (like if I place a jquery.js library into a subfolder of my skin's root?
  2. Where can I find documentation in incorporating JQuery scripts into my skins / DNN 4.9 sites?

Thanks
Jon


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
8/13/2009 3:32 PM
 

 Disclaimer : I could be completely wrong on this BUT - I don't think DNN 4x has native jQuery support. Of course all DNN5 does is call the script for you.

For any time you want to be using jQuery, you just need to make sure there is a reference to the jQuery.js script, and then you can use jQuery. It is fine to reference it multiple times as well, such as if your skin does and your module (or the text/HTML) module does.

Best documentation I've found is the jquery site and google. There are a lot of more specific things I have to look up about using jquery and .NET that google gives me the best examples of, but jquery is still an excellent initial point.

 
New Post
8/14/2009 8:48 AM
 

Joe has some more info in his personal blog I think:

http://blog.theaccidentalgeek.com/

 
New Post
8/17/2009 1:53 PM
 

Thank you Timo for the useful link.  I went through Joe's posts, and though it didn't answer my question directly, it did give some insightful tips.

I ultimiately got this to work across all browsers in a 4.9.4 installation using the following in my .ascx skin file:

<script type="text/javascript" src="<%=skinpath%>js/jquery.js"></script>
<script type="text/javascript" src="<%=skinpath%>js/mydownloadedopensourcescript.js"></script>
<script type="text/javascript">
(function($) { 
$(document).ready(function(){   
            $("#myidgoeshere").myscriptselector({
            });
        }); 
})(jQuery);           
    </script>
 

The important bit here for me was the <%skinpath%> selector - that curbs a number a path issues...

Also, as Joe's posts indicate, wrapping the $ jQuery selector into a simple function allows one to reuse 3rd party / existing scripts without them interfering with DNN's native javascripts, and thus eleminates having to change selectors from $ to something else...

Timo, though this works 100%, I just wanted to query if <%skinpath%> is the correct way to get something like this going..?  Seems like it.  For some reason I always thought this was only used for images, bit seems to work for any path relative file...

Jon


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
8/18/2009 4:41 PM
 

 Jon - I just queryied this same thing today.  The only question I have about your method is - how does DNN handle when a module calls to implement jQuery.  For instance - I have a module that  I override the OnInit function to load the jquery  by simply adding a LIteral to the Page.Header - where the literal is the script tag calling http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js

I found that my solution was the only way not to mess up the Nav control.

And then - what about 3rd party modules that load jQuery - is there anything to be wary about?



Andrew Walker

Learn to make your own beer and wine at homeIf you enjoy making your own beer and/or wine - be sure to check out http://www.ForemostBrewing.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...JQuery in DNN4.9.0 (to 4.9.4)JQuery in DNN4.9.0 (to 4.9.4)


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out