selector

Why is the control flow not entering @selector(methodname)?

I've written some code for a button action. First I'm creating a button "UI", and its onAction should call ButtonListener in @selector in addTarget. But it doesn't seem to be entering the @selector(UIButtonListener) method. Here's my code: UIButton_G_obj = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; UIButton_G_obj.fram...

find the relative element with jquery

Is there a simple and clean jQUery-way to find the element who a element is having it's relative position to? In other words: finding the first parent who has the css attribute position: relative, or the body-element (if no parent elements has position: relative). I do -not- know the css-class or whatsover of the parent. ...

jquery select not class form multiclass assigment

Hi i am having the follow code <div id="container"> <div class="element NOTME"></div> <div class="element"></div> <div class="element"></div> <div class="element"></div> </div> the code below select the inputs inside container with class element $("#container .element input[name^='myname']").each How can i rewrite t...

Jquery: How to affect parent WHILE not children?

Hi, Is there a way to not affect children that are inside a parent when the parent is being changed? <p>old text <a class="mylink">old link text</a></p> $("a.mylink").click(function() { $(this).parent().text("new text for p"); $(this).text("new link text for a"); }); }); The above seems to get rid of the link tex...

C# Linq Select Problem in Method Chain.

Note that the _src inherit IQueryable<U> and V inherit new(); I wrote the following statement, there is no syntax error. IQueryable<V> a = from s in _src where (s.Right - 1 == s.Left) select new V(); But if i RE-wrote it as follows, the Visual Studio editor complains an error in the "Select" IQueryable<V> d = _src.Where(s => s.Right...

Targeting an iFrame once with jQuery

Hi, I have a series of frames (4) which are used in a page to create loading of dynamic content through Ajax calls. In each of these frames I target parent level elements and update them with there respective content e.g. $("#loadingGrid1",top.document).show(); $("#frameSkills",top.document).hide(); In jQuery is there a way to inste...

Cannot select CustomTraceListener with "Type Selector" window in Enterprise Library 4.1

i created a Custom Trace Liastener inside a class library : namespace SendMailTraceListener { [ConfigurationElementType(typeof(CustomTraceListenerData))] public class SendEmailTraceListener : CustomTraceListener { public override void Write(string message) { throw new NotImplementedException(); ...

ListView item background via custom selector

Is it possible to apply a custom background to each Listview item via the list selector? The default selector specifies @android:color/transparent for the state_focused="false" case, but changing this to some custom drawable doesn't affect items that aren't selected. Romain Guy seems to suggest in this answer that this is possible. I'm...

How can I filter using the current value of a text box in a jQuery selector?

I have a validation script that checks for data-* attributes to determine which fields are required. If an element has the 'data-required-if' attribute (which has a jQuery selector as it's value), it checks to see if any elements are found that match that selector. If any are found, the field is required. It does something similar to the...

how do you reuse a partial view with setting different ids

i have a partial view with a dropdown in it. the code looks like this: <%=Html.DropDownListFor(x => Model.Exercises, new SelectList(Model.Exercises, "Id", "Name", Model.SelectedExercise), new { @id = "exerciseDropdown", @class = "autoComplete" })%> the issue is that i want to reuse this partial view in multiple places but i want to ...

Background selector declaration in CSS

Hello, In CSS declaration for a selector is given as: background-attachment: scroll; background-color: transparent; background-image: url(/images/ucc/green/btn-part2.gif); background-repeat: no-repeat; background-position: right top; I want to optimize the code and change it to: background: scroll transparent url(/images/ucc/gre...

jQuery selector performance

I have the following two code blocks. Code block 1 var checkboxes = $("div.c1 > input:checkbox.c2", "#main"); var totalCheckboxes = checkboxes.length; var checkedCheckboxes = checkboxes.filter(":checked").length; Code block 2 var totalCheckBoxes = $("div.c1 > input:checkbox.c2", "#main").length; var checkedCheckBoxes = $("div.c1 > i...

Getting "Expected ',' or '{' but found '[selector]'" error.

Getting "Expected ',' or '{' but found '#44559'" error. My code looks like this: var valueid = $("div#center-box div#empid-textbox input").val(); //valueid=44559 if($("div#esd-names li#" + valueid).length > 0){ //DO SOMETHING; }; I'm getting the value of what is entered into a textbox input field which in case is "44559" can't see...

How to override universal selector font-size in IE6

Hi folks... I have an issue in an ExtJS-based application, however, I don't believe the problem to be ExtJS-specific (I could be wrong, but I suspect not). The issue is that I have a universal selector like so: * { font-family : arial; font-size : 10pt; font-weight : bold; } Later on I have some markup (generated by ExtJS) as s...

jQuery-sortable, selector for the dragged element?

Hello I have divs inside columns and want to make them sortable. I'm using jQuery UI for this. However, I need to do something on the element which is currently being sorted. How is that possible? Here's my current code: $('.column').bind('sortstart',function({ $(CURRENTLY_MOVING).doStuff(); }); Martti Laine ...

Any way to get read timeouts with Java NIO/selectors?

I'm converting a Java server application which used blocking IO and thread-per-client to NIO and a single IO thread (probably a thread pool after I get the basic implementation done). The one thing I am having an issue with is disconnecting clients after they have been idle for a period. I had previously been using SO_TIMEOUT and block...

how to get the value from a textbox that is next to my text

i have an html page where i have a table of items (one item per row) where each item is a html link that says "Add" and there is a textbox next to each link with a number in it. the text link and the textbox are in the same td inside the row of the table. how do i, using jquery, capture the value from the textbox that is to the right o...

jquery xml select

hi, How to select items whose sub-tag key's text starts with '001'? <root> <item> <key>001001</key> <text>thanks</text> </item> <item> <key>001002</key> <text>very</text> </item> <item> <key>002001</key> <text>much</text> </item> </root> $(xml).find("item>[filte...

Should I use performSelector: when I also can call the method normally?

Hi, I want to call a method on an object which I get through [self delegate]. I know which class it is so I can import the class and call it normally but I could also use performSelector: which doesn't require importing my class. I do not need to pass a parameter to the method. And yes, I did read this. Which one is preferable in this c...

Are Objective-C initializers allowed to share the same name?

I'm running into an odd issue in Objective-C when I have two classes using initializers of the same name, but differently-typed arguments. For example, let's say I create classes A and B: A.h: #import <Cocoa/Cocoa.h> @interface A : NSObject { } - (id)initWithNum:(float)theNum; @end A.m: #import "A.h" @implementation A - (id)ini...