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

HomeHomeDevelopment and...Development and...Getting StartedGetting StartedJQuery not workingJQuery not working
Previous
 
Next
New Post
8/3/2011 7:14 AM
 

i try to use jquery in dotnetnuke 6 but it is not working for me what is did is ;

i went to host setting under jquerysettings i choose use hosted jquery version and i press update .

i create html module i choose html i put my jquery code as follow but it is not working why like that 

<script type="text/javascript">
$(document).ready(function(){
  $("button").click(function(){
    $("p").hide();
  });
});
</script>
</head>


<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>


please help me 
 
New Post
8/4/2011 5:53 AM
 
jquery is not included by default, in dotnetnuke modules that want to use it register it so that only 1 copy is loaded (if you load more than 1 copy of jquery it doesnt work) - see http://www.dotnetnuke.com/Resources/Wiki/Page/jQuery.aspx for details on how to register jquery.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/4/2011 10:02 AM
 
I'm having a similar problem, except mine is in the .ascx page and only occurs when logged in as someone capable of editing the page. The script is:

<script type="javascript" text="text/javascript">
$(document).ready(function () {
$('HTMLid').cycle({ fx: 'fade' });
document.getElementByID('HTMLid').style.display='block';});
</script>

This script executes fine when not logged in, or when a user accesses a page they're not capable of editing, but when they do it pushes all content to the bottom of the page.

The script is supposed to control the cycling of images, but doesn't get executed and displays all the images one below the other and pushes everything else down the page.
 
New Post
8/4/2011 2:20 PM
 
Brandon, jquery is not automatically available on every page in dotnetnuke 5.x - instead when a page loads if a module requests it then it's loaded once. When youre logged in the control panel makes that request hence why you're seeing it work for logged in users but not anonymous ones. To resolve this add your own code to register http://www.dotnetnuke.com/Resources/Wiki/Page/jQuery.aspx

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
9/20/2011 11:51 AM
 
Hi Cathal,

I tried both DotNetNuke.Framework.jQuery.RequestUIRegistration() and DotNetNuke.Framework.jQuery.RequestRegistration() inside Page_Init but it didn't resolve the issue.

This scenario only happens for a custom page I created which will be available for admin/super user.

Any idea?

Thanks,
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedJQuery not workingJQuery not working


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