I noticed this rule in Firebug:
*|*:link {
color:#0000EE;
}
I'm not sure that I've ever seen the vertical bar (|) before. It's in the about:PreferenceStyleSheet so it may be Firefox specific.
What does it mean? Any link to a reference? I thought possibly that the vertical bar was an "OR", but that's the comma in CSS.
...
I'm using mootools-1.2.3 at the moment and I'm having trouble getting a variable to be accessible outside of a function.
I need to define the variable in the domready function, because otherwise the DOM hasn't been loaded and selector functions will not work (I can't place the script at the end of the HTML I don't have control of when t...
Is there an easier/quicker way to get the element added using jQuery append:
How to get the $selectors element:
$container.append('<div class="selectors"></div>');
var $selectors = $('.selectors', $container);
I tried:
var $selectors = $container.append('<div class="selectors"></div>');
but that makes $selectors = $container
Mayb...
How can I select the 1st item in a wrapped set? I have $(":radio")
This returns a wrapped set of two items. Is there any way I can select just the first item? Basically something like this but cleaner syntax
var singleListItem = $($(":radio")[0]);
That will probably work, but it looks hideous to me. Is there a better way to write this...
I'm looking for some sort of tool that can take an html document and pump out a selector based representation of the file.
For example:
<div>
Some text
<ul class="foo">
<li>First</li>
<li>Second</li>
<ul>
</div>
And output a flat text file in the spirit of:
div
div #text Some text
div ul.foo li Frist
div ul.foo li Se...
Which is better to select textbox:
input[type=text] or input:text
Which to use?
...
Below is my HTML content
<HR><HR><H3>Document_1</H3>
<PRE>PART2_1</PRE>
<PRE>PART2_2</PRE>
<HR><HR><H3>Document_2</H3>
<PRE>PART3_1</PRE>
<PRE>PART3_2</PRE>
<PRE>PART3_3</PRE>
I want to wrap all the elements between <HR><HR><H3>......<PRE></PRE> into different DIVs. In other words I will have 2 <DIV>. I have tried...
If I have a bunch of numbered fields in a web form, like an invoice:
< input type="text" name="Item1" /><input type="text" name="Desc1" /><br />
< input type="text" name="Item2" /><input type="text" name="Desc2" /><br />
< input type="text" name="Item3" /><input type="text" name="Desc3" /><br />
Using JQuery, how would I select the fi...
I'm trying to select an element given by:
/html/body[@id='someid']/form[@id='formid']/div[@id='someid2']/div[@id='']/div[@id='']/div[@id='']/table/tbody[@id='tableid']/tr[7]/td[2]
Now the html of that row I'm trying to select looks like this:
<tr>
<td class="someClass">some text</td>
<td class="someClass2">my required text for verif...
Suppose the jQuery object is $obj,how to select the desired ancestor?
...
Hi Guys,
I have an HTML table. I need a jQuery selector to select only the TR's, where column2 (TD) text is equal to = "foo". Is this possible?
<table>
<tr><td>asdasd</td><td>foo</td><td>fsdf</td></tr>
<tr><td>asdasd</td><td>xxx</td><td>fsdf</td></tr>
<tr><td>asdasd</td><td>xxx</td><td>fsdf</td></tr>
<tr...
I have two in a table with ids row_26 and notificationrow_26.
I want to highlight row_26. So I use either
var deviceUID = 26;
$("#row_" + deviceUID).effect("highlight", {}, 3000);
OR
$("tr[id^='row_"+deviceUID+"']").effect("highlight", {}, 3000);
but when I do this. It also highlights the notificationrow_26 . Also the highl...
I'm still kind of new to Objective-C and I'm wondering what is the difference between the following two statements?
[object performSelector:@selector(doSomething)];
[object doSomething];
...
I need to hide() all class level elements of '.dd-container' except when that element has an id of '#tools'.
I tried the following (which didn't work) but I'm pretty sure I fudged the syntax:
$('div:has(.dd-container):not(#tools .dd-container)').hide();
...
Is it possible to have some sort of Id scoping when manipulating DOM with JS?
I use jQuery as my JS framework.
For example:
Is there any mechanism that would allow to select someDiv children of first or someDiv children of second, or do all ids on the page have to be unique?
I know this would be doable using classes...
I want to have a click event on the body tag, but I have a div under the body tag which i dont want to have the click event on. I have tryed with this but that doesent seem to work correct:
$("body").not("#InnerDiv").click(function() {
alert("Hejhej");
});
The html:
<body>
<div id="1">1</div>
<div id="2">2</div>
<div id=...
$.prev("div.a").find('.b').
$.prev("div.a .b").
One works and the other does not. What's the difference?
...
Can Somebody please tell me why this script is not working.. Its supposed to work, but doesnt, I am getting the id correctly, but Div's are not displaying properly.. My idea is to display one div based on the click, and hide the other Div's. Please help..
Script
$(document).ready(function() {
$("a").live("click", function(){
va...
Hi,
I'm working on a table where all rows have at least one class. Some rows have two classes and others have a class and an id.
I have a simple bit a jquery to hide and show rows onclick, however when all the attributes are set, nothing happens.
If I remove the additional attributes, so that only those in the jquery script are used...
What's the best way to select the html of an element, inclusive? For example:
<div id="testDiv" class="testClass">
This is just a test.
</div>
Whereas $('#testDiv').html() returns "This is just a test.", I would a selector that returns:
<div id="testDiv" class="testClass">This is just a test.</div>.
Thank you for your replies.
...