selector

CSS selector exclude elements, hpricot

Hey, I am trying to write a CSS selector that select everything except the script elements with hpricot, I can easily select the all the contents of the select-me div and then remove the script elements but I was wondering if its possible to use a selector which will exclude the script elements: <div class='select-me'> <p>This is some ...

Get Raw HTML of Node in JQuery

I have used $("#parent").html() to get the inner html of #parent, but how do I get the html of the parent itself? The use case is, I grab an input node like this: var field = $('input'); I would like to be able to get the raw html of that node (<input type='text'>) with something like field.html(), but that returns empty. Is this po...

How do I use a jQuery not selector to select relative URLs?

I'm working on a little jQuery script to add Google Analytics pageTracker onclick data to all relative URLs on my forum, allowing me to track clicks to external sites. I don't want to add the onclick to internal links on forum.sitename or sitename, and I don't want to add them to any hrefs marked # or that start with /. My script below...

android: customized text selector

I wanted to design a customized text selector that changed the text color when user clicks the TextView. But got the following error: java.lang.RuntimeException: Unable to start activity ComponentInfo{}: android.view.InflateException: Binary XML file line #55: Error inflating class here is what I have: drawable/text_selector.xml ...

<span> tag selection problem within anchor using jquery

Dear expert, I have facing a problem to select span tag using jquery. Please give a solution. code: <ul> <li> <a href="#Document1">Document 1 <span id="tab_close> x </span> </a> </li> </ul> ...

Problem with jQuery selector and MasterPage

Hi, I have a problem with a master page containing a asp:textbox that I'm trying to access using jQuery. I have read lot sof thread regarding this and tried all the different approaches I have seen, but regardless, the end result end up as Undefined. This is the relevant part of the MasterPage code: <p><asp:Label ID="Label1" Associate...

jQuery : selector question (stylesheet class)

hi all, how can i select items with a classname that contains spaces? like <a href='button normal'> thx ...

How to use Selector when click a item in list

I occur a problem when develop a application on android. There have two image which can be download from server in a list item, it will show one image and will show another image when user select or click this item . if I try to download another image from server when user click it,the user will never have time to see it, for this time ...

CSS selector driving me nuts!!!

Apoologies in advance for the slightly long winded code in this question @charset "UTF-8"; /* CSS Document */ * { margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; } #wrapper { width:900px; margin:0 auto 0 auto; } #header { background-color:#800080; width:894px; min-height:60px; paddin...

JS Framework that doesn't use CSS selectors?

A thing that I noticed about most JavaScript frameworks is that the most common way to find/access the DOM elements is to use CSS selectors. However this usually requires the framework to include a CSS selector parser, because they need to support selectors, that the browser natively doesn't, foremost the frameworks own proprietary ext...

iPhone - Launching selectors from a different class

Hi, I'd like to reload a table view which is in another class called "WriteIt_MobileAppDelegate" from one of my other classes which is called "Properties". I've tried to do this via the NSNotificationCenter class - the log gets called but the table is never updated. Properties.h: [[NSNotificationCenter defaultCenter] postNotification...

JQuery 'live' for selector?

Hello, I would like to have the same behaviour 'live' has, but without using events. Is this possible? I need this because I'm using a different javascript file that creates some elements to which I need to append css classes. The following code should execute once such an element is added to the dom: $(".myClass").addClass("myNewClass...

NIO Best Practices - SelectableChannel and InterestOps

Hello, using java.nio one has to register interest in operations via the SelectableChannel: SelectionKey = SelectableChannel.register(selector, interestInOpsBitmask) Registering Interest: overwriting the existing SelectionKey by executing SelectableChannel.register with new Ops VS. updating the existing SelectionKey with key.intere...

Can you select an element with two classes in jQuery

I have an element that has two classes but can't seem to select it with jQuery. Is it possible. Here's the code: <html> <head runat="server"> <script type="text/javascript" src="abc/scripts/jquery-1.4.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { alert($(".x.y").html()); //sho...

Accessing items at deeper levels using children() in jQuery

Hi, I want to access a simple button in an unknown nested level of a container. Using container.children('button') allows me to access buttons in the first level, i.e.: <div> <button>test</button> </div> Trying to use the same with the following construct: <div> <div> <button>test</button> </div> </div> .. fails, because the...

iPhone: “Unrecognized Selector Sent to Instance” Error

I’m trying to implement a partial overlay modal in my app with the code from “Semi-Modal (Transparent) Dialogs on the iPhone” at ramin.firoozye.com. The overlay functionality works and it slides the modal into view, but calling any IBAction from the modal's controller causes an “Unrecognized Selector Sent to Instance” crash. I recreated...

jQuery.next on a text snippet with no selector

Here's some example code: <input type="checkbox" id="send-notice" name="send-notice" value="1" /> This is a notice to all users. <label for="subject">Subject</label> I want to be able to select the text "This is a notice to all users." so I can remove it. I'm not sure how to do so though. I've tried using jQuery('#send-notice').n...

how to select a div within a list in jquery

I'm following a tutorial for a menu bar and I'm having trouble adapting it to use qTip because I cant seem to be able to find a way to select a particular element. <div class="leftside"> <!-- all things in floating left side --> <ul id="social"> <li><a class="rss" href="#"></a> <!-- icon --> ...

Listview's first item is always selected

I'm using a custom view to display items in a listview. For some reason every time the list is populated; the first item is shown as selected (ie; orange highlight). I've tried everything I can think about to solve it; any ideas? ...

How to simplify my country select menu PHP/mysql

I have a select menu that displays countries. It looks at the DB and judging by the value in the db shows the option as selected. Is there a simpler way off doing this than: if ($country == 'AG') {echo '<option value="AG" selected="selected">Antigua</option>';} else {echo '<option value="AG">Antigua</option>';}; if ($country == 'AR') ...