Skip to main content

All Questions

Tagged with
0 votes
1 answer
18 views

Active class for single class element jQuery

I have these buttons which are actually p elements in a grid and they all have the same class. I would like to change the color of the p element which the user clicks on. How can I add an active class ...
shimmyshimmyya7347's user avatar
0 votes
2 answers
482 views

Form validation in ajax requires only the first input in the class to be filled

I'm trying to do validation for my form. I want to make it so if any item with class "required" is empty the form won't be submitted. Right now this is the case only for the first item in ...
Astw41's user avatar
  • 392
1 vote
2 answers
86 views

jQuery do not insterAfter a class if next class is specific

I am looking for a solution to my problem. The situation is as follows. I have the following div's <div class="group"> <div class="A1_B1 symptom">Bla Bla Bla</...
Jay's user avatar
  • 774
0 votes
1 answer
147 views

Find element by unique or single class JQuery

I have the following content: <div class='c1'>content</div> <div class='c1 c2'>content</div> <div class='c1'>content</div> How to get the the divs with the class ...
ameliapond's user avatar
4 votes
1 answer
6k views

jQuery select elements that do not contain a class [duplicate]

I would like to select all elements with the .hi class, that do not contain the .image class. <div class="hi"> <div class="hue"> <div class="image"&...
George Morris's user avatar
1 vote
1 answer
1k views

Select all the elements with the same class, with some having two classes

I try to select all the elements having the same class, and do css() on them. It works when the elements have one class, but when they have two classes these ones are not selected. My elements : ...
Jey10's user avatar
  • 681
1 vote
1 answer
57 views

Get element with specific class

I have several divs in my variable offers and I want to retrieve the one with class special. How can I find that element? Or apply selector on variable offers? For Example offers contain: <div ...
Huma Ali's user avatar
  • 1,779
0 votes
3 answers
3k views

How get class name from 'this' reference in jquery

I want to know how can I get the class name of an element from this reference. I have following HTML element <input type="checkbox" class="NotSelected @placeholderString" onchange="...
Huma Ali's user avatar
  • 1,779
0 votes
1 answer
17 views

How would one select an element with the class="" using jQuery

The text I want to select using the class="" is shown below: <span class="">1&nbsp;Comment</span> $('.').each(function(i,elem)... does not seem to work. I also want to parse the ...
asharma's user avatar
0 votes
1 answer
53 views

Navigate Next or Previous div by class in jQuery

I am trying to create Navigation (Next and Previous) buttons, which displays the Next (or Previous) div having class marked. JSFiddle Link HTML part <table> <tr id="row_question_container"...
Dr. Atul Tiwari's user avatar
0 votes
1 answer
76 views

jQuery/Javascript get classes of multiple elements to show an element with this class

I'm struggling with a jQuery live search. First of all the live search update with the following code works. //live search function function live_search(list) { $("#search") .change( ...
Tom Te's user avatar
  • 3
1 vote
4 answers
3k views

Click Event Not Working After Class Change

I have the following script: // dashboard maximize $('#dashboard-actions .btn-maximize').click(function() { // max / restore buttons $(this).removeClass('btn-maximize').addClass('btn-restore'...
user avatar
0 votes
1 answer
581 views

AddClass in jQuery on runttime and select the new class

I'd like to add a class to a div tag in runtime (after clicking the tag) and select the div tag by the new class name afterwards. Here is my code: HTML <div class="black" id="" style=""> ...
FDue's user avatar
  • 3
0 votes
1 answer
30 views

selecting an element after adding a new class is not working

I'm having a link which will be clicked only once. So I'm adding a class to the link to verify that it's been clicked and prevent the user from clicking it again. <a href="#" id="plus">my link&...
PHP User's user avatar
  • 2,412
1 vote
1 answer
275 views

jquery class-selector vs qualified class-selector

I am currently writing my bachelorthesis about webperformance and just came across some results I didn't expect. As Paul Irish or jquery itself recommend it's always best to descend from an id. http:/...
haeki's user avatar
  • 152

15 30 50 per page