jquery-selectors Questions

3

Solved

I'm using ExpressionEngine and SafeCracker along with Ajax (plugin: jquery.form.js - http://jquery.malsup.com/form/). Best I can tell, SafeCracker will only allow for updating a single entry at a...
Armament asked 27/5, 2012 at 15:52

3

Solved

I've noticed that $( 'filter:last' ) is different from $( 'filter:last-child' ) in jQuery. I tried the jQuery docs but had a hard time understanding what additional purpose :last serves and why t...
Columbite asked 9/1, 2018 at 2:18

3

Solved

I have some HTML like this: <span id="cod">Code:</span> <span>12345</span> <span>Category:</span> <span>faucets</span> I want to fetch the categor...
Lowercase asked 10/1, 2016 at 19:20

7

Solved

I'm following this example and typed $( "div:contains('John')" ).css( "text-decoration", "underline" ); , but got an exception: VM23376:1 Uncaught DOMException: Failed to execute '$' on 'CommandLi...
Ive asked 18/3, 2017 at 16:13

8

Solved

I am having a set of text fields where i am doing validation Say I am Having a field called "seats" this can accept value less than "99999".Meaning I should not able to enter the "99999" any thi...
Illconditioned asked 23/12, 2010 at 15:23

16

Solved

To get the chosen value of a select2 I'm using: var x = $("#select").select2('data'); var select_choice = x.text The problem is this throws an error if not value has been selected and I was wond...
Cleocleobulus asked 28/1, 2014 at 18:0

9

Solved

I'm trying to create a button that can select next option. So, i have a select (id=selectionChamp) with several options, an input next (id=fieldNext), and i try to do that : $('#fieldNext').click...
Hemorrhoidectomy asked 19/7, 2012 at 8:11

8

Solved

I'm trying to select an HTML element on my page that has a specific class and ID. Here's the tag: <div class="statusLight" id="green"></div> I tried this with no luck: $statusLight ...
Jolie asked 7/1, 2010 at 16:1

5

Solved

I want to select a table column and all I know is the header text of the column. (th.innerText) I tried the following code but it doesn't work: ownerIndex = $('th:contains("Owner")').index(); $('...
Pliocene asked 4/12, 2011 at 13:28

29

Solved

I have a select field with some options in it. Now I need to select one of those options with jQuery. But how can I do that when I only know the value of the option that must be selected? I have th...
Picardi asked 12/11, 2012 at 12:16

7

Solved

Trying to figure out how to use the Jquery .on() method with a specific selector that has multiple events associated with it. I was previously using the .live() method, but not quite sure how to ac...
Statecraft asked 22/12, 2011 at 18:14

3

Solved

So, I have some JavaScript/jQuery that looks like this: var $foo = $('#bar'); $foo.hide(); I've been operating under the assumption that jQuery operates on the given selector, and saves the resu...
Lemur asked 27/11, 2012 at 14:48

7

Solved

HTML: <div id="panel"> <table> <tr> <td><input id="Search_NazovProjektu" type="text" value="" /></td> </tr> <tr> <td><input id="Searc...
Stability asked 8/3, 2010 at 16:11

4

Solved

How would I determine whether the element returned by an :input filter in jQuery is a textbox or select list? I want to have a different behavior for each ( textbox returns text value, select retur...
Pita asked 24/2, 2011 at 17:36

15

Solved

With: if(element.hasClass("class")) I can check for one class, but is there an easy way to check whether "element" has any of many classes? I am using: if(element.hasClass("class") || element....
Owlish asked 6/2, 2010 at 22:15

4

Solved

I want to select a bunch of spans in a div whose CSS contains a particular background color. How do I achieve this?
Devil asked 11/11, 2008 at 21:31

20

Solved

Using jQuery I'm programmatically generating a bunch of div's like this: <div class="mydivclass" id="myid1">Some Text1</div> <div class="mydivclass" id="myid2">Some Text2</div...

8

Solved

I want to insert a large chunk of html into a pre-existing <td>. I am using this method: $("td#content").html(LOTS_OF_HTML_CODE_HERE); But it doesn't work. I am a noob, there are a lot of...
Capias asked 13/8, 2010 at 18:42

28

Solved

Is there any way to select/manipulate CSS pseudo-elements such as ::before and ::after (and the old version with one semi-colon) using jQuery? For example, my stylesheet has the following rule: .sp...
Dodd asked 18/2, 2011 at 12:53

20

$("*").click(function(){ $(this); // how can I get selector from $(this) ? }); Is there an easy way to get selector from $(this)? There is a way to select an element by its selector, but what ab...
Incinerate asked 10/3, 2010 at 22:4

3

Solved

As of jQuery 1.9 the .selector property of jQuery objects has been removed. (I'm a little confused as to why, exactly). I actually use it in a few unique scenarios, and I know that I could do other...
Scevor asked 19/2, 2013 at 18:28

8

Solved

Given the following table: <table id="incidents"> <thead> <tr> <th></th> </tr> </thead> <tbody> </tbody> </table> Using jQuery ...
Microgram asked 30/7, 2013 at 5:44

15

Solved

I have a table column I’m trying to expand and hide. jQuery seems to hide the <td> elements when I select it by class but not by the element’s name. For example: $(".bold").hide(); ...
Minus asked 10/7, 2009 at 1:5

23

Solved

Suppose I have a drop-down list like: <select id='list'> <option value='1'>Option A</option> <option value='2'>Option B</option> <option value='3'>Option C&lt...
Dowski asked 13/10, 2008 at 4:6

19

Solved

I know I can get all checked checkboxes on a page using this: $('input[type=checkbox]').each(function () { var sThisVal = (this.checked ? $(this).val() : ""); }); But I am now using this on a p...
Coffin asked 27/3, 2011 at 15:11

© 2022 - 2025 — McMap. All rights reserved.