selector

jquery: tricky selector question

hi i'm having this markup: <div id="main"> <div nam="item">1</div> <div nam="item">2</div> <div> <div nam="item">3</div> <div nam="item">4</div> <div nam="item">5</div> </div> <div nam="item">6</div> <div nam="item">7</div> </div> i'm now selecting only the direct child ...

jQuery selector help ?

How to anchor paragraph in other HTML pages and in the same time highlighted the area where the pointed paragraph is located when click the the button in the current page? I made this simple code in JavaScript just doing the anchor thing Current page: <html> <form> <input type=button value="open in new tab" onClick="goToU...

Jquery html attribute : How to exclude an element's child's html from that element's html.

Code snippet : <div id="some_text"> <p>some text</p> <div id="child"> <p>some other text</p> </div> </div How can I only get "<p>some text</p>"? ...

using jQuery NOT selector to exclude elements with particular children.

I have a function that appends some HTML to an element. It may get called more than once, so I only want it to append the HTML to elements that haven't already had the HTML added. Example: <div class="divToAppendTo"></div> <div class="divToAppendTo"><span class="myAppendedMarkup"></span></div> As such, I'd like to select all .divToAp...

jQuery selector question

Hi, I have a unordered list like the one below: <ul id="tabs"> <li><a href="#tab1">latest news</a></li> <li class="active"><a href="#tab2">latest posts</a></li> <li><a href="#tab3">latest posts</a></li> <li><a href="#tab4">latest posts</a></li> </ul> I can't find a jQuery selector that gets the next list item ...

Another jquery :not selector question....

The :not always gives me such headache. I am trying to not repeat an addition of plus sign. This is the selector that gives me the element I want: #submenu li.current_page_ancestor.current_page_parent a:first Basically I want to say that if that selector does NOT already have a plus in front of it, add it. But where do i put the :not...

jQuery: get certain element from selector

i searched the docs and couldnt find it :( let's say i'm selecting all elements like: var items = $(".myClass"); it returns eg. 5 items - now how can i grab select eg. the 2nd one? items(2) or items[2] doesnt work .. ...

jQuery: selector question (parent)

hi all, i'm having this markup: <ul class=container> <li rec=1> <div> <div> <div>i'm here</div> </div> </div> </li> </ul> now i'm at the div element ("i'm here"), how can i get reference to the li? i tried div.parent("li"); but didntwork .. ...

Jquery find next/prev elements of a certain class but not necessarily siblings

The next, prev, nextAll and prevAll methods are very useful, but not if the elements you are trying to find are not in the same parent element. What I want to do is something like this: <div><span id="click">hello</span></div> <div><p class="find">world></p></div> When the span with the id "click" is pressed, I want to match the next ...

jquery custom selector with colon

I need a function to select all elements with a custom attribute, and take its name and value. for example: <input type="text" my:name="koni" my:age="20" my:city="New York" /> Note that my is always the same, but that behind not. in my function i then want to say: var attr = //here should be the attribute (attr, or attr2) and var ...

jQuery: Using Variables in Selectors

Every searches I made only included solutions for variables like this: $('#div'+ id) I need to delete a row. var row = $(this).parent().parent().parent().find('tr#' + id).html(); I'd like to use the "row" name instead of "$(this)...remove();" ...

Python Selector (URL routing library), experience/opinions?

Does anyone have opinions about or experience with Python Selector? It looks great, but I'm a bit put off by its "Alpha" status on pypi and lack of unit tests. I mostly like that its simple, self contained, and pure WSGI. All other url routers I've found assume I'm using django, or pylons, or paste, or pull in lots of other dependenci...

simple question about jquery selector

for example, if I have: var $target = $("div#target"); and then, I would like to pass this jquery object $target to another javascript function I defined myself, like: function f(xml, $div_t) { } inside the function f, is there someway I can retrieve the original div's ID from the object $div_t? ...

jquery load a selector contained in a variable

Hello, Can anyone help me with the right syntax to load some div, please I try'd to concat it in several ways, except the right way rcp= "#div02"; $("#content").load("/inc/forms.php " +rcp'"', function(){.... I will keep trying in the meantime EDIT AND ACCIDENTLY GOT IT RIGHT (not completely yet) $("#content").load("/inc/forms.p...

jQuery selector question

hi all, here's my markup: <div class=container> <ul> <li class=record> <div class=item></div> <---- I am here </li> </ul> </div> the container is always present, but the UL is optional. what i want to do is get the "next parent" - element (from my current item), either li.record (if present) or...

FileBrowser/FileSelector for WPF

Hello, does anybody know, if there is a WindowsExplorer-like filebrowser which I can include in my WPF-window. I don't want use OpenFileDialog. I have searched a bit and only found simple directory-trees or lists. I want to have an interface like it is in OpenFileDialog. Would be great if there are any advices, Greetings, Martin ...

JQuery "select all except"

Hi! I am trying to select the first row of a table. Note: the first row is wrapped in a thead tag, so: <table> <thead> <tr> <!-- first row --> </tr> </thead> <tbody> <tr> <!-- body --> </tr> </tbody> <tfoot> <tr> <!-- body --> </tr> </tfoot> </table> The 'select first row' tip could work if it wasn't for th...

how to use performselector to invove the function with argument after perticular time period

Hi, I am new to this i phone app programming. I have a function with one argument type as structure pointer. This is shown below -(void)responce:(structurePtr *)someData { ...... ...... } I want to call this function using performselector method after 5 seconds of time interval. Please tell me how to call above responce function usi...

invove the function having one argument after perticular time period using performselector

Hi, I am new to this i phone app programming. I have a function with one argument type as structure pointer. This is shown below -(void)responce:(structurePtr *)someData { ...... ...... } I want to call this function using performselector method after 5 seconds of time interval. I have used below code to perform the activity [self...

Using jQuery objects in jQuery selectors

Hi all, I'm fairly new to jQuery, and think I might be making something harder than it needs to be. I've got a jQuery variable that is just an unordered list. It was declared this way: var $list = $('#activityList'); // activityList is ID of <ul> I'm trying to select all <li> elements within that list using the variable I've created:...