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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...JQuery Click EventJQuery Click Event
Previous
 
Next
New Post
9/22/2011 6:00 PM
 
I'm trying to add a function that tracks a click event on the user forums using JQUERY:
$('#dnn_ctr382_Forum_Search_cmdSearch').bind('click', function() {
        _gaq.push('ForumSearch');
    });

When I step through it, the _gq.push function is never called. It's acting like the click event is false. Any ideas on how to implement this on DNN  5.6.1?

thanks in advance.
 
New Post
9/23/2011 5:56 AM
 
Have you tested if the element can be found on page load and that it is not somehow loaded after. If so you have to use the live() method

Also the way you do it is not transferable, since its only usable in that specific page an not hers better do check to of part of the attribute. My preferred method is checking of it ends with what I need ( after all the stuff added in frond is .net/dnn added so not really needed and changing every time )

so in your case something like ( supposing its a link )

jQuery('a[id$="Forum_Search_cmdSearch"]')
 
New Post
9/23/2011 10:44 AM
 
Brilliant. Thanks for the help.
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...JQuery Click EventJQuery Click Event


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