Solved

JQuery Popup on links

Posted on 2011-09-19
2
370 Views
Last Modified: 2012-05-12
Hello Experts,

I am having a hard time with image popups over-lays on my site.

I am using this JQuery-based framework http://easyframework.com/
Around other features, if I assign a class of POPUP to a link that points to an image, that image is displayed in an overlay window.

Problem is that after upgrading to JQuery 1.6.1 the popups are not working anymore.

The error I am getting from FireBug is: $(this).attr("href") is undefined

Problem is that on my site there are a lot of links with a class of "popup" and it would take a lot of time to modify them all.
What I need is maybe a JQuery script that will work the same way: scan the page for links with a class of POPUP and make them open the content (image) in a popup.

Thanks so much!
0
Comment
Question by:daniel_spiri
2 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 36559843
$(".popup").each(function(){
  window.open($(this).attr("href"));
});

does this not work?
0
 

Author Closing Comment

by:daniel_spiri
ID: 36566408
Simple and working, great! thank you
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now