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

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...jquery questionjquery question
Previous
 
Next
New Post
4/8/2010 2:54 PM
 

 Hello, I'm converting a site which god forbid, has mouse over images; UGH.  I found this jquery mouse-over and it seems to work very well without little code. http://code.google.com/p/jquery-swapi...

In a virtual machine test site on my machine, I was able to get it working properly without any problems.  But, when I try to implement the same on the live side, I get an error.  Any ideas as to what is causing me issues?  Thanks.. -Jeff

Both the virtual and live side are running DNNCE 5.3.1.

HTML Module Header:
<script type="text/javascript" src="Portals/0/resources/js/archives/jquery.metadata.min.js"></script>
<script type="text/javascript" src="Portals/0/resources/js/archives/jquery.swapimage.min.js"></script>

HTML Module Code:
<script type="text/javascript">
   $.swapImage(".swapImage");
</script>

<div>
   <img class="swapImage {src: '/Portals/0/resources/images/archives/index/about1.jpg'}" alt="" src="/Portals/0/resources/images/archives/index/about.jpg" />
   <br />
</div>

Error:
Message: Object doesn't support this property or method
Line: 342
Char: 2
Code: 0

Line 341-343:
<script type="text/javascript"> 
$.swapImage(".swapImage");
</script>

 

 
New Post
4/8/2010 7:19 PM
 
Check Host Settings for use of Hosted jQuery version. Check the HTML source to see if the link for jquery is in there twice. Linking to the jquery twice will make your script fail.

Jeff Smith
VivoWare, Inc. - Open Source Social Networking Modules for DNN.
 
New Post
4/9/2010 9:52 AM
 
Jeff Smith wrote:
Check Host Settings for use of Hosted jQuery version. Check the HTML source to see if the link for jquery is in there twice. Linking to the jquery twice will make your script fail.
Hello.. Thank you for the reply..  I looked and the link for jquery is only listed once. In the host settings, it shows jQuery 1.4.2 and the hosted jQuery URL points to ajax.googleapis.com.  The other two check boxes (debug & use hosted) are not checked. As in my code which I posted, you'll see that I don't have the jQuery listed again.  Not entirely sure why it works in the test environment, but not the live.Thanks.. -Jeff  
 
New Post
4/9/2010 10:21 AM
 

Jeff,

I am tempted to say "namespace pollution."  On all my DNN sites, I use jQuery(blah) rather than $(blah).  I stopped using the shorthand because I had run into some namespace pollution issues with an app I was developing.  Switched to the long-hand and everything started working.

That may or may not work for you, but it's certainly a place to start.

 
New Post
4/9/2010 10:25 AM
 

 Hello..  Ok..  I was wondering if it may have been something with the $.  I read something with on a DNN blog that the $ could cause issues.

I'm in the process of learning javascript and jQuery, so I'm not sure how I would switch to long-hand.

How would I re-write the following to see if it'd work..

<script type="text/javascript">
   $.swapImage(".swapImage");
</script>

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...jquery questionjquery question


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