selectors

MooTools: Attaching event to multiple elements

I've got a jQuery routine I need to convert to MooTools, but I can't get it to work. Here's my jQuery version: $(".google-analytics-link").click(function () { var href = $(this).attr("href"); pageTracker._link(href); location.href = href; return false; }); Here's my MooTools translation: $$(".google-analytics-link").a...

jquery - convert attribute based on class selector to a list of ints

i have a number of divs with the class="mydiv" each of these divs also has an attribute id which is set to a number i want to basically say (pseudo code) select all divs with class = "myDiv" loop through them and get the id attribute combine all ids into a list and return an array of these integers is this the best way of doing that?...

Jquery Select element 2 positions further - another way to .next().next()

Hey, I am searching for a way how I could select a div element which is not the direct next one to the one which is "selected" by a click function. <div id="click">(siblings)</div><div>text</div><div id="get this one"></div> Now i would like to select the one with the id "get this one" - in my code this id is not available. All the ...

memory problem with perform selector - iphone

hello i got a problem and i don't know how to solve it. this is what i try to do: the user picks an image from his album on his iphone. while the image will be saved in the application folder, a actionsheet should popup with an activity indicator on it till the saving process is done. below you can see how i tried to do it, but i think ...

UIControl (addTarget:action:forControlEvents:) @selector arguments

@selector(updateStuff:) This is automatically sends the parameter :(id)sender. Is it possible to override this to be something else? In my particular usage, the actual sender is meaningless. I'm using a UITableView and setting a UISwitch in the UIAccessoryView slot on every cell. Originally, I was adding the UISwitch to the UIAccessory...

jQuery Selectors

I am trying to get an array of checkboxes that ARE checked AND have a certain attribute (tag) that is NOT blank. (I know that the attribute called tag is not HTML compliant but it does work across the major browsers and makes life alot simpler!) e.g. <input type="checkbox" name="First" tag="[email protected]" checked="checked"> <inp...

show uiactivityview while an other operation is loading

hi all i googled for hours now but i can't find a code example, which describes how to show an uiactivityview while an operation/method is loading. in my case i want to show it while i load a large image to an uiimageview. have you got an idea how to realize that? thanks in advance. sean ...

CSS: Use tag type before ID?

One of the guys here at work puts the tag name in front of all his CSS selectors for element ids. For example: div#footer { } This, as opposed to just: #footer { } His rationale is that this is a quicker lookup for most browsers because they don't need to check the id attributes of every type of element--just div elements. He als...

YUI3 selector problem in ie8

Y.one('form fieldset:nth-child(2)').toggleClass('hide'); in chrome, FF, opera this line works but in ie6-8 it throws an error 'Y.one(...)' is null or not an object. where is the problem? ...

Strange behavior when applying Array.prototype.slice method to result of querySelectorAll

I'am trying to use jquery's selectors as custom Selenium locate strategy. Exactly as in this article http://johnjianfang.blogspot.com/2009/04/how-to-use-jquery-to-create-custom.html Unfortunatly when I use selenium.click('jquery=a.mylink') method nothing happens. But selenium.click('css=a.mylink') still works perfectly. I did a little...

ID selector problems with jQuery

I am constructing an extremely simple image rotator for use in Wordpress. It is comprised of a containing DIV and the "slides" (DIVs containing the images) that I want to rotate. The problem I have is that there are multiple instances on the page. To get round this I have used the $gallery->id output to give me each gallery a specific c...

JQuery how to select next id with selector

The html: <div id="videos"> <a href="javascript:loadAndPlayVideo('QXoIMTjk9Xg')"><img src="http://i.ytimg.com/vi/QXoIMTjk9Xg/default.jpg" id="thumb_QXoIMTjk9Xg"></a> <a href="javascript:loadAndPlayVideo('nWubfMkDfVs')"><img src="http://i.ytimg.com/vi/nWubfMkDfVs/default.jpg" id="thumb_nWubfMkDfVs"></a> <a href="javascript:lo...

How do I target attribute of opacity in jquery?

I know about the attributeContains selector, but how does it apply to style attributes? I want to find all <a> tags that have their opacity set to 0. I tried this : $("a[style*='opacity: 0']") But it returns nothing. ...

Calling children of specified index?

Anyone know the proper syntax to write this statement? $('.nav ul li')[0].children("a") For some reason this is not working. The return is that its not a function. :( ...

How could you with jQuery select the number at the end of the pathline?

I am trying to grab that 15 at the end of the href with jquery.. <a class="ajax" href="/organizations/1/media/galleries/15">Silly Gangs</a> Any ideas? ...

New CSS3 selectors doesn't work for me?

Ok, I have code like this: <div id="header"> (yeah, have to use div instead of header tag, don't ask me why) <a href="link"><img src="image1.png" alt="image1" /></a> <a href="link"><img src="image2.png" alt="image2" /></a> <a href="link"><img src="image3.png" alt="image3" /></a> </div> And I want to select the first ima...

Is it ever acceptable to have multiple IDs in a html page?

There's quite a few questions on Stack Overflow about id vs class but these questions are nearly always in relation to CSS - and the generally accepted answer is to use classes to style a particular set of elements, and ids for specific instances. Makes sense, fair enough. I'm finding however that as I do more and more Javascript/jQuer...

Unrecognized selector sent. Objective-C error

Hi, I am writing a google reader application and have been trying to create the settings table view with UISwitch. Below is the complete code sequence: @implementation Settings @synthesize rowImage; @synthesize ViewPushed; @synthesize alreadySignedIn; @synthesize syncStartupSwitch; @synthesize confirmMarkSwitch; @synthesize landscapeMo...

Jquery css selector using regular expressions

I have a DYNAMICALLY generated Navigation div <div id="WebPartWPQ9" > <table class="xm-ptabarea"> <tbody> <tr> <td nowrap="" class="tab"><a href="/somelink.aspx">Overview</a></td> <td nowrap="" class="tab"><a href="/anothersomelink.aspx">Financials</a></td> <td nowrap="" class="tab"><a href="/somemorelink.aspx">Newsfee...

select deepest child in jQuery

Hi, is there a cheep method to select the deepest child of an element ? Example: <div id="SearchHere"> <div> <div> <div></div> </div> </div> <div></div> <div> <div> <div> <div id="selectThis"></div> </div> </div> </div> <div> <div></div> </div> </div> ...