I have this jquery script :
$.fn.myFoo = function(){
alert(this.selector)
alert($(this).selector);
}
then i call it like so.
$('#myID').myFoo();
I need but it returns empty: i need it to return "myID" i can't seem to find a way to do this can some one help please?
...
hi all,
i'm trying to get a div which has "panel current" as classname.
the problem is the space - how can i select it?
thx
...
I didn't see anything on here about it with a quick search, if there is let me know.
Here is an example of a CSS selector I'd write.
div#container div#h h1 { /* styles */ }
div#container div#h ul#navi { /* styles */ }
div#container div#h ul#navi li.selected { /* styles */ }
I write all my CSS like. This allows me to stop from having ...
Here is my site:
http://www.raceramps.com/v2
Move your mouse over the menu on the right side. Notice how Car Service, Trailer Hauling, and Show & Display are fully enlarged by default. This is because they are higher selling products, and most people who view this site are looking for those.
Currently there is an accordion menu setup...
I'm trying to make a selector using form labels.
$("label:not[for='other']")
$("label[for='other']")
<label for="other">
<label for="somethingElse">
If someone selects the label for 'other', do something. If they pick a label for anything that isn't 'other' do something else.
...
hello,
i'm working with java.nio.channels.Selector and i'd like to create a separate thread for each selectedKey that is ready for read/write/accept but i want to make sure that the same socket is never handled by two different threads simultaneously. what would be the best way to do it ? i was thinking to cancel each selectedKey before...
Im currently writing some form validation with jQuery and having the followin problem..
I give ids to my inputs in such a way that when data is posted, i have an array to work with like so..
<input type="text" id="user[name]" />
<input type="text" id="user[email]" />
This means that when the data is posted to my script, i will have a...
how would i select the following in jquery
<ns:text value="my value" />
i have tried selecting it like so:
1:
var x= $('ns:text').attr('value');
return x;
2:
var x= $('text').attr('value');
return x;
but nothing so far... i don't know if it is possible or not but ...
Thanks
...
I've often wondered about the use of selectors versus equivalent functions in jQuery. By this I mean statements that comprise the same components that return identical result sets, but are constructed differently.
Take the following example:
alert($("#FundManager1>option").length);
alert($("#FundManager1").find("option").length);
(No...
i want to loop through all dropdown selects with a certain class name and add an item to it and i am just struggling with the correct selector
EDIT: I must be doing something wrong as most of the upvoted accepted answer dont seem to work so i think there must be some quirk in my code. I have pasted both the HTML and the jquery code ...
Hi,
I'm new to the Objective C business (Java developer most of the time) and am woking on my first killer app now. :-)
At the moment I am somehow confused about the usage of selectors as method arguments. They seem to be a little bit different than delegates in C# for example.
Given the following method signature
-(void)execute:(SEL)...
Look at this:
var selection= $('table td:first-child');
In practice it selects the first row's <td> elements in the table.
When I saw it for the first time, I took it as: Select all first-child elements within all <td> in the <table> </table>.
But what it does is: Select all <td> within the table if it is the first-child of its pare...
More of a curiosity question...when doing the following:
$('.selector1, .selector2').doSomething()
Does jQuery fully traverse the DOM twice to get each set of objects matching each selector or is it finding all the elements in one traversal of the DOM?
...
Is it possible to use @selector and performSelector: (or similar) with methods using variable arguments list?
I'm writing a class that can be assigned a delegate to override the default behavior. In the presence of a delegate select method calls made on an instance of that class will be forward to the same corresponding delegate method,...
Hi !
I need to write a custom WPF control that should look like a ComboBox with extended items search feature. For this purpose I'd like to have a TextBox and a Popup with a search TextBox and a ListBox.
My first question is if it's a good decision to inherit from Selector, or rather ComboBox ?
The second question is where can I find...
Hi all,
This should be an easy one, but I can't find a good example anywhere. I'm trying to select a particular element on my page that has a class of 'statuslight' and a title attribute of one of three options. The option (it will depend) is stored in a variable called 'currentStatus'. I've seen some examples, and I'm guessing this is ...
I'm pretty new to sIFR and though I've used it successfully for simple applications like headings, I'm trying to use two different fonts simultaneously - one for a heading and one for a menu.
The heading works fine, but I'm stuck with the menu. I'm using the Tofurious Wordpress theme. This is the section of the theme's stylesheet that go...
Hi,
I'm trying to do an asynchronous request with ASIHTTPRequest, but have some problem getting notified when the request is done.
-(void)doDownload{
NSURL *url = [NSURL URLWithString:@"http://www.someurl.com/?"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setPostValue:@"someValue" forKe...
I'm trying to modify a name-related element. I'm taking values from a drop-down and displaying them in a div. Their ids are:
selected_terms
selected_terms_div
I have a number of these pairs and I was hoping to write generalized code instead of hard-coding it (I figure it'll be useful later).
This code isn't working:
$("#" + $(this).at...
I've created my own Delegate for a ObjC class. The class itself deals with Core Data operations. Delegate methods are used to inform other classes about changes that happened to the datastore. The class that deals with the datastore is called Datastore and it's delegate is called DatastoreDelegate. A UIViewController of mine (ContactsVie...