Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7838267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:03:12+00:00 2026-06-02T15:03:12+00:00

I have got this html on the page: <a href=review.asp?sitename=webcamking#video_embed class=tutorials data_site=webcamking>&nbsp;&nbsp;Tutorial 1</a> This

  • 0

I have got this html on the page:

<a href="review.asp?sitename=webcamking#video_embed" class="tutorials" data_site="webcamking">&nbsp;&nbsp;Tutorial 1</a>

This jquery:

    $('.tutorials').click(function(event){
       event.preventDefault();
       event.stopPropagation()
       var linkText=$(this).text();
       var siteName= $(this).attr('data_site');
       alert("Test. linkText:"+linkText+". siteName:"+siteName);
      _gaq.push(['_trackEvent', 'LinkClicked', siteName, linkText]);
       //window.location.href=$(this).attr('href');

       return false;

  })

The problem is that the link still keeps sending me to the destination. I need to stop it. I need to check what I get with the alert..and hope the google analytics event is triggered!!

Update: Modified code:

$(document).ready(function(){

       $('.tutorials').click(function(event){
       event.preventDefault();
       var linkText=$(this).text();
       var siteName= $(this).attr('data_site');
       alert("Test. linkText:"+linkText+". siteName:"+siteName);
      _gaq.push(['_trackEvent', 'LinkClicked', siteName, linkText]);
       //window.location.href=$(this).attr('href');

       return false;

  });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T15:03:14+00:00Added an answer on June 2, 2026 at 3:03 pm
    1. Did you enclose your jQuery code block in the $( document ).ready( function() {}) statement?
    2. Is there any piece of code above this block that is breaking down and preventing this block from executing?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got this html: <div id=myDiv> <p class=readMore></p> <p class=readMore></p> <p class=readMore></p> </div>
I have got a PHP/HTML page where I want to fetch data from but
I have got this function that returns a constant..Here is my class and function:
I got this HTML structure: <form> <input class=myTrigger type=radio value=1/> <input class=myTrigger type=radio value=2/>
I have an xml file which I imported in my html page like this:
I have got this button: <input type=button value=Rep id=rep name=rep class=rep style=width:50px onclick=triggerLabel(1);this.disabled=true;addRep(<?php echo
I have got this statement: $query=INSERT INTO error_report(task_id,url_is_route, forbidden_word, google_host_fail, google_cache_fail, google_title_fail, google_element_fail, robots_noindex_nofollow,
I have got this error when using Enterprise Library 3.1 May 2007 version. We
I have got this code: XDocument xdoc = XDocument.Load(URI); XElement root = xdoc.Element(forecast); //get
I have got this code and I am trying to understand the convention followed,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.