selector

Add custom action:@selector to UISwitch on TableViewCell

Hello guys, I have TableCellViewController for managing cells in my UITableView. Each cell has a label na UISwitch (dictTypeSwitch). A want to assign method to switch events so I can save the state of button. So far I've done this: assign setState function to object: [cell.dictTypeSwitch addTarget:self action:@selector(setState:) for...

using jquery selector with ids with comma

I am using MyTableGrid to show an Excel like control in my webpage. The cells are referenced with ids like "mtgIC1_0,2" for table 1, column 0, row 2. Unfortunately, when I try to use the jquery selector with this id $("#mtgIC1_0,2"), it never works. I figured it is because of the "," since it works for any other ids in the page withou...

retrieve sql data records in columns instead of rows

How can I do a SELECT statement and have it returned the data incolumns instead of rows? FROM +----+-------+--------+ | id | name | number | +----+-------+--------+ | 0 | test | 11 | | 1 | test2 | 12 | +----+-------+--------+ TO +----+------+--------+----+-------+--------+ | id | name | number | id | name | number |...

Select element after adding it

Hi, I have the following code img.after('<li></li>'); Which works correctly and add the "li" element. Now I want to select the "li" element; it doesn't have any class or ID, but I want to select it just after creating it, so I'm able to use it (for example mynewli.addClass()) as a jquery element. How can I do that? ...

ImageButton in Android homescreen widget

I have a homescreen widget with an imagebutton. I have the button working with a pending intent, but I can't seem to figure out how to change the button image when it is pressed. I tried using a selector and it works in my widget test activity, but not in the remoteview. How could I implement this functionality in the home screen widg...

MultiView Control Selelct is Always null

hi my dear friends : I want to check multiview, ActiveViewIndex with Javascript, but in the below code, MultiView is always null: document.onkeyup = onkeyupOfDocument; function onkeyupOfDocument(evt) { var evt = evt || window.event; var MultiView = document.getElementById("MultiView1"); alert(MultiView); } How can i f...

Wordpress: Adding class selectors to the_tags(); output

How do I get the_tags() to output each tag so that it comes assigned with a unique class selector? So for example: the_tags() currently outputs something like this: <a href="http://myblog.com/tag/kittens" rel="tag">kittens</a> However, I'd like to output something like this: <a href="http://myblog.com/tag/kittens" rel="tag" class="ta...

jQuery this and Selector $(this:first-child).css('color', 'red');

Is it possible to use a :selector with the following in jQuery? $('.galler_attr').bind('click', function() { $(this:first-child).css('color', 'red'); }); ...

jquery - find a pattern anywhere in a string?

I still get a little confused when it comes to selectors and patterns... Basically, I'm trying to find the parent div of an input item and if a string is found anywhere in its ID, I want to set it to display none. I've done this before by just doing something like: if($('div[id*=string]')) { $(this).attr('display','none'); } But,...

@selector in objective-c not behaving as expected

Hi all, I am a little perplexed and I have been working on this for hours and googling without any real leads. I want to create a callback in objective-c for my iPhone app utilizing the @selector. Class 1: - (void) someMethod { // create selector SEL successCallback = @selector(successMethod); // call some service with c...

is .find() faster than basic descendant selecting method?

In Paul Irish's blog http://paulirish.com/2009/perf/, in slide 30 it is mentioned: $('#container').find('div.robotarm') is faster than $('#container div.robotarm') What's your opinion? ...

What is the purpose of the 'div' selector and why do so many developers use it in their style sheets?

Looking through style sheets from popular & unpopular websites I have found the div selector included in them. The bottom four examples were taken from the style sheets of the popular sites Stack Overflow, Github, Youtube & Twitter: div.form-item-info{padding:4px 0 4px 4px;width:80%;color:#777;} .searchFooterBox div span.smallLabel{fo...

call method in different from @selector in Objective-C

Hello, How do we call a method which is in classB from @selector tag of classA.?? Can i do it in this way?? [tis_obj authenticate:self action:@selector([classB method]:) accName:@"BOOK" User:@"User"]; Is there a possibility to call a method of different class form@selector tag?? or should the method be always in same...

multiple parameters in @selector in Objective-C

hello, If this is the method name which has to be called: -(Authenticate_Obj)Authenticate_User:(NSString*)Number:(NSString*)name:(NSString*)password how to call this method from the @selector ?? can i do it in this way?? [tis_obj AuthenticateMobileServer:self action:@selector(AuthenticateUser:::)]; Thank You. ...

MooTools 1.1, how to get id of class and apply a style

I need to get the id attribute of a class and apply a style based on that id. So for instance, 3 list items each with the class "typo", one id is "application", another id is "application_osx", and the final id is "application_osx_terminal" The class "typo" is handled by CSS, but I would need to assign a background image based on the I...

Issue in @selector of Objective-C

Hello, [mobile_Obj AuthenticateMobileServer:self action:@selector(Handler:) AccountNO:@"123" UserName:@"Sun" Password:@"123***"]; In the above method call , can we have two threads running simultaneously?? One thread running: AuthenticateMobileServer method Second thread runnig: Handler method Please let me knw is it possible or...

Including variable in jquery selector

Hi there, I have a quick question. I'm matching class names of LI elements to turn on and off divs with a matching ID name, as follows: $("ul#mainnav li").click(function() { $("#mainpages > div").fadeOut(200); var navClass = $(this).attr('class'); var targeted='#'+navClass; $(targeted).fadeIn(200); // thi...

prototype selector equivalent to jQuery

Hi! How can I select the popupwindow of the popup-lightbox div? in jQuery, it's be something like $('div#popup-lightbox #popupwindow'). Unfortunatly, in Prototype, it's not that easy... anyone can help me? thanks! <div id="popup-lightbox" class="popup"> <div id="popupoverlay"></div> <div id="popupdiv"> <div id="popupwi...

What is the default drawable for pressing a list item

When the user presses a ListView item (android:state_pressed="true") it flashes a shade of yellow (or you can press and hold). What drawable is this? I've created my own selector because I want my own ListView item color , but I lose the pressed color. There's an Android doc about skinning buttons that references #ffff0000, but this p...

Call selector on superview (UITableViewController)

I have a UITableViewController with a method called "sectionOpen". In this controller I have a UITableView with custom headers, which are in fact a UIViewController. I have attached a UITapGestureRecognizer to it, it works if I call a selector on the header's View Controller. The thing is I need to call a selector on the UITableViewCont...