selectors

Question about jQuery Selectors

Hi, i want to select all h1 tags except myclass with jQuery. For example i want select < h1> but i don't want to select < h1 class="myclass"> Thanks ...

Need to do the opposite of NSSelectorFromString()

In Cocoa, you can write @selector(mySelectorNameWithObject:) to get a compiled SEL, or at runtime, NSSelectorFromString(@"mySelectorNameWithObject:") with return a SEL. According to Apple documentation: The only thing that makes the selector method name different from a plain string is that the compiler makes sure that selectors are ...

how to make a jQuery selector work throughout the browser window

Hi i'm using the jQuery mousewheel extension and it uses the following bind $('html').bind('mousewheel', function(event, delta) { window.scrollBy(-120 * delta, 0); return false; }); The delta is determined by the mouse wheel movement and the page scrolls horizontally. All is fine except when you move the cursor on an empty s...

jquery selecting certain 'level' of elements?

Say I have the following markup: <div> <h3><a href="">link I want to select</a></h3> <div> <h3><a href="">link</a></h3> </div> <h3><a href="">link I want to select</a></h3> <h3><a href="">link I want to select</a></h3> <a href="">link</a> </div> Assuming the following... The elements I w...

jquery select element with multiple attributes

Ok..i'm having a brainfart right now with jquery's selector process (yes, it's quite confusing to start). I have 2 input elements on the page, of which I want to remove one. here are my inputs: <input value="[email protected]" name="Email" type="hidden"> <input value="[email protected]" id="Email" name="Email" type="text"> I have a ...

Registration policies for read and write when working with NIO sockets

When working with NIO sockets in Java, once I'm connected I can either register for both read and write operations and just do nothing whenever I get a write notification and I have nothing in the outbound buffer, or I can register for read notifications only and re-register for read and write only when something is placed in the outboun...

Trying to pass CGrect to performSelector withObject

Hi, I'm trying to pass a CGRect: SEL frameSel = NSSelectorFromString(@"setFrame:"); CGRect rect = CGRectMake(10, 10, 200, 100); [object performSelector:frameSel withObject:rect ]; But this does not compile I also tried: SEL frameSel = NSSelectorFromString(@"setFrame:"); CGRect rect = CGRectMake(10, 10, 200, 100); NSValue * value = ...

Jquery Selector Options

Hi Guys, First post here so please be gentle :) Ive tried searching all over the net and im not sure im searching by the right terms niether for its name. But what does the secondary options do in a jQuery selector? For example: $('.results table', this.parent().prev()) The second lot of options on the .results table matches im not ...

Using jQuery selectors with normal Javascript?

I'd like to be able to do: if ($("cheese_tag") == document.getElementsByTag("cheese_tag")[0]){ alert("success!"); } Is this possible? Basically what I'm wanting to do is use the ease and power of jQuery selectors to manipulate elements. Is what I'm talking about possible? REVISION: Sorry, a better way to state my question would be "C...

In which direction are CSS selectors validated

I remember watching a video a while back online that was a talk given by an engineer at Yahoo and in it he mentioned that CSS selectors are read, by the browser, right to left and not left to right. Meaning #body .header .links a would actually pull out all anchors on the page filtering those with a parent of class links that had a paren...

Get penultimate element

Hi, Is there a way in jQuery using selectors to identify the penultimate element? Is there something like a :last-1? The list can be any length so i cant use 'eq' Any help would be much appreciated. A. ...

JQuery nested ul-li tree, searching and applying

I have a tree of ul's that I want to search with jQuery and apply styles to those matching so this: Regional |-InternetAccessGroup |-Wasters |-Packaging |-Users |-Students |-Hello Fred |-Package Student |-Teachers |-Package Teacher ...

iPhone: " 'class_name' may not respond to methd_name" and "Unrecognized selector" Errors

Hi, I have written an application in which I want to convert a .jpg image to .bmp format but I it fails with the error: class_name' may not respond to methd_name". My code is following : #import "CalculateRGBViewController.h" @implementation CalculateRGBViewController @synthesize skinImage; @synthesize lblRedColor,btn,img; str...

Probably simple jQuery selector question

I have some code right now that executes when a link is clicked. The HTML is structured: <a href='link1'>Stuff<span class='color-bar'></span></a> <a href='link2'>Stuff<span class='color-bar'></span></a> <a href='link3'>Stuff<span class='color-bar'></span></a> With the jQuery like so: $('a').liveQuery('click',function(event){ ... ...

Using css child selector

I am trying to apply css on the first A element inside .Outer, .Outer > a:first-child {font-weight:bold} doesn't work. Why? <div class="Outer"> <img src='image123.jpg' /> <a href="Default.aspx?ID=4083" id="ctl00_CPH_Main_Rep_List2_ctl03_HyperLink1">John Johnsson</a> <a href="../Users/ViewList.aspx?module=Occupation&amp;ID=70">Doc...

Using JavaScript/jQuery to return a list of CSS selectors based on highlighted text

I've been given some project requirements that involve (ideally) returning a list of CSS selectors based on highlighted text. In other words, a user could do something like this on a page: Click a button to indicate that their next text selection should be recorded. Highlight some text on the page. See a generated list of CSS selector...

jQuery selector

I have this HTML code: <div class='com_box'> <div class='com_box_c'> <div class='com_box_info'> <a id='quote'>quote</a> </div> </div> </div> When I click in a#quote i want to add a textarea after '.com_box'. How do I select the outer div? Here is my no working try so far: $('a#quote').click( function() { var...

jQuery selectors: logical OR

I can't seem to see the forest for the trees right now (Looked at the api docs already). It has to do with jQuery selectors: What I'm trying to do is to select all elements that have class subtitle or headsection. Something like this: $('.headsection || .subtitle'); To be more specific: I want to use this selector with the function next...

Android ListView style

Hi, I have a question about list views. I hope someone knows the solution, because I have been trying to solve this problem all weekend. I have a custom list view in which every row have a custom .xml (item_row.xml) with a set color background for the row item. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http:...

Jquery Selector not working on Internet Explorer

Internet Explorer does not like my Jquery selector. Not sure if it's my weak Jquery skills or general Explorer strangeness. Here is the Code: $("#field_"+index+" #field_Label").val(); [div field_1] <input id="field_Label" //... you get the picture. to explain this.. I have a DIV labeled field_1, field_2.. etc.. Internet explorer ...