Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Simple jQuery problem
Old 09-04-2009, 06:03 PM Simple jQuery problem
pealo86's Avatar
Super Spam Talker

Posts: 850
Name: Matt Pealing
Location: England, north west
Trades: 0
I have a feeling that the problem is really obvious, but I think I'm blind to it due to exhaustion and too much time staring at the screen!

I'm trying to get a 'p' tag to append to an 'a' tag which then appends to a div, but nothing appears!

I can get the 'p' to append to the div on it's own, but appending the 'a' just isn't working for me! Hmmmm...

Here is my code, much appreciation to anyone who can help:
Code:
// make form results appear in a popup
// set class to #frm-pop
$('#frm-pop').attr('class', 'frm-pop');

// create close link
$(document.createElement('a')).attr('id', 'pop-close');
$('#pop-close').click (function () {
    $("#frm-pop").fadeOut (1000);
    return false;
});
$('#pop-close').appendTo('#frm-pop');
$(document.createElement('p')).attr('class', 'pop-btm').text('Close').appendTo('#pop-close');
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
 
Register now for full access!
Old 09-05-2009, 06:52 AM Re: Simple jQuery problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
A <p>aragraph is a block element and cannot be contained inside an (inline) <a>nchor element.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-05-2009, 08:09 AM Re: Simple jQuery problem
pealo86's Avatar
Super Spam Talker

Posts: 850
Name: Matt Pealing
Location: England, north west
Trades: 0
ohhhh yeaaaaaahhh! Haha silly me, thanks.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Reply     « Reply to Simple jQuery problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13607 seconds with 12 queries