selector

iPhone dev - Passing arguments in a selector

I have a barButtonItem that calls an action which swaps two views in an animation block. I disable the barButtonItem at the beginning of the action method that it calls, and the I want to enable it when its finished, so that the user can't flip the view again before it has finished flipping. It does this in a UIView animation block, so...

Problem with directories and file selector (VC++ 2008)

Hi, I have implemented a file selector with a combobox. I want to write the selected filename to a log. The problem is that when I select a file from the original directory it goes well but when I choose a file from another directory it won't work. Can anybody help with this? Here is the code for the file selector, it is inside a dialog...

jQuery Set Selected Option Using Next

Hello, How can I, using jQuery, set the "next" item of an already selected item as "selected." For example, if I have: <select> <option value="1" >Number 1</option> <option value="2" selected="selected">Number 2</option> <option value="3" >Number 3</option> <option value="4" >Number 4</option> </select> We can see that "Number 2" i...

jQuery Set Select Index

Hello, I have an select box: <select id="selectBox"> <option value="0">Number 0</option> <option value="1">Number 1</option> <option value="2">Number 2</option> <option value="3">Number 3</option> <option value="4">Number 4</option> <option value="5">Number 5</option> <option value="6">Number 6</option> <option value="7">Number 7</opti...

Which of these selectors is likely to be faster?

A couple of questions actually, Given that the following two will return the same result set $("#MyTable tr"); $("tr", "#MyTable"); is there any difference in performance between using the Parent-Child CSS selector convention or specifying a context to the selector instead? Also, given that I can guarantee a tr will be an immediate ...

jQuery: How to find prev or next element based on name?

Here's what I'm trying to do, simplified: <input rel="TimeStart"> // bunch of HTML code in between <input rel="TimeEnd"> In the Javascript: $("[rel="TimeEnd]").blur(function() { // find first previous element named "TimeStart" // compare their dates }); I tried using $(this).prev("[rel=TimeStart]") but it keeps returning nu...

Does IE ignores custom css selectors?

Hey guys, IE is freaking me out. my css code looks like this: kl { font-size:10pt; font-weight: bold; color:#6e90a6; } and my html code looks like this: <div id="testid"><kl>test</kl> Why does IE ignore my CSS code? Please could someone help me :)? Update: Great responses guys, that was really fast :) Thank you all...

load a new page when an html's selector changes without javascript

How can I (if at all) load a new page when an html's selector changes if javascript is disabled in the browser. Can it be done? ...

Selector.close throwing a java.util.ConcurrentModificationException on AIX platforms

Hi, I am using java nio selector, and seem to hit the following issue randomly but consistantly in my application while calling the selector.close. The selector object is being accessed by a single thread in my application. The same application works fine on Solaris, Linux and Windows. I feel that this is an issue is with the AIX...

jQuery - Refering to a specific row in a table

Hi, I have a table and can count the number of rows using var count = $("table tr").length; Basically, I have up and down arrow controls to reorder the rows in the table. I do not want the down arrow to appear for the last row and similarly the up arrow to appear for the top row. Is there a way to refer to specific rows in the table s...

Using jQuery, how to find out if CSS selector "input[type=text]" is natively supported by browser?

In my CSS I have a rule that must be applied to all text fields (using the CSS3 selector input[type=text]. I also use jQuery. Some browsers like Internet Explorer 6 does not support that form for CSS selector. So my workaround is to add an extra classname in CSS: input[type=text], .workaround_classname{ /* css styling goes here */ } ...

Jquery select div in a row

Hiya all, I'm really stuck .. I need urgent advice :D here is my html : <!-- Beginning of ROW !--> <div id="row1"> <div id="entry"> free <span>some text</span> <p>DKK</p> <input type="radio" name="red<% Response.Write(counter); %>" id="radio" value="0" /> </div> <div id="entry"> week <span></span> <p>DKK</p> <input t...

jQuery Not selector causes infinite loop

The following code causes my browsers to crash. For Firefox, i've been given an option whether or not i want to stop jQuery because it was running longer than it should be. div id="divLeaving"> You are about to leave to: <span id="spanLeavingURL"></span> <a id="divLeavingYes" href="#">Yes</a><a id="divLeavingNo" href="#">No</a>...

Jquery - Select first cell of a given row?

Hi, I have a table with images in one column. When I click the image, would like to get the text value of the first column in that row. I can get the whole row with this: var a = $(this).parents('tr').text(); However, I cannot isolate the first cell of the row. I've tried var a = $(this).parents('tr td:first').text(); But that...

jquery addclass styling doesn't work, wrong selector?

<li id="leistungen"><a href="#Leistungen" onclick="sitemapChangeSubMenu('leistungen','leistungencontent','leistungen'); return false;">LEISTUNGEN</a> </li> This is the list-item which I want to style with: $("#leistungen a").addClass("brown"); This doesn't work for either: $("#leistungen").addClass("brown"); my css code is just ...

What does selector 'a[href*=#]' mean in jQuery?

What does selector 'a[href*=#]' mean in jQuery? And what does location.pathname, location.host, this.hash, target.size() mean? The complete code snippet is: $(document).ready(function() { $('a[href*="#"]').click(function() { if (location.pathname == this.pathname && location.host == this.host) { var target = $(this.hash);...

How to select not-direct left sibling <span> with jQuery?

<span>This is the span I want to select</span> <div>something here</div> <a id="start"></a> Suppose can only access $('#start'), I tried $('#start').prev('span') but not working. ...

How to get index number inside $.click() of jQuery?

$("span.ws_label").click(function() { }) By selector "span.ws_label" there are 5 elements selected, when one of them is clicked, how to know which one actually? EDIT I must get the index or its id,$(this) is no use to me. ...

How do I call performSelectorOnMainThread: with an selector that takes > 1 arguments?

A typical call to performSelectorOnMainThread: looks like this: [target performSelectorOnMainThread:action withObject:foo waitUntilDone:NO]; where "result" is an argument passed to "action". A corresponding action would be: (void)doSomethingWithThing1:(id *)thing1 What is the correct syntax for calling an action that takes > 1 argu...

jquery selector in variable

can someone explain why this jquery selector is not working, I've worked around the issue but for my sanity would like to know what I've got wrong I have a form with multiple textareas, each gets an id like f_id_DSC000001.JPG where the last part is a photograph number, the textarea has an onblur event that uses post to send its contents...