Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Move this topic
Forum :
Getting Started
Using jQuery
Using jQuery Plugins
Using jQuery UI
Developing jQuery Core
Developing jQuery Plugins
Developing jQuery UI
QUnit and Testing
About the jQuery Forum
jQuery Conferences
jQuery Mobile
Developing jQuery Mobile
Sub forum :
Move this topic
Cancel
Using jQuery
leads
Select a dynamically created element ?
in
Using jQuery
•
5 years ago
It has a classname of listitem so I tried it like this:
$(".listitem").css("background-color","transparent").removeClass('selected');
Does nothing!
1
Replies(5)
jakecigar
Re: Select a dynamically created element ?
5 years ago
$(".listitem")
.css("background-color","transparent").removeClass('selected');
There is no such thing as
document.listitem.
JΛ̊KE
Leave a comment on jakecigar's reply
kbwood.au
Re: Select a dynamically created element ?
5 years ago
Where is your code in relation to the creation of that element? Can you provide a page that shows the problem? Preferably in JSFiddle.
Leave a comment on kbwood.au's reply
jakecigar
Re: Select a dynamically created element ?
5 years ago
I see you edited your question. Not a good idea.
Background color is usually transparent, and removing a class might not do anything, if it is not actually already on the element.
JΛ̊KE
leads
Re: Re: Select a dynamically created element ?
5 years ago
I edited it before anyone had replied. I more or less solved the problem by storing the id of each dynamically created element in an array and using the array to handle what I needed to do. Kind of sloppy but it works.
jakecigar
Re: Re: Select a dynamically created element ?
5 years ago
But not before anyone had seen it.
Using ids like that is sloppy. Had you presented the problem with an accompanying fiddle, you would probably have gotten a less kludgy solution.
JΛ̊KE
Leave a comment on jakecigar's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to leads's question
Top
Reply
{"z52992451":[14737000007073116,14737000007073121],"z2953500":[14737000007077091],"z2950240":[14737000007078221,14737000007078225,14737000007078227]}
Statistics
5
Replies
1638
Views
1
Followers
Tags
Cancel
dynamic
Actions
Permalink
Related Posts
Dynamic Callback
Dynamic Tabs
Dynamic Content
Dynamic Forms
dynamic toggle
Dynamic Formular