Could anyone help me fix this xpath expression? - xhtml

Time for another silly question :)
I got some tables in a xhtml-document with class="mytable" and inside those tables all sorts of elements, including <input type="checkbox"/> .. Now, I need to select all these checkboxes. I figured I'd use jquery with xpath, but my expression doesnt seem to work.
So far, I've come up with
$("table[class=mytable]//input[type=checkbox]")
.. but that doesnt seem to work :( Any help is appreciated :)

I would use Css selectors not xpath
$('table.mytable input[type="checkbox"]')

$("table[#class='mytable']//input[#type='checkbox']")
I think you need the # symbol to target attributes and single quotes around the attribute values

Related

How can I use multiple or selectors in fancybox 3?

Can someone help me in adding multiple selectors if possible in
$().fancybox({
selector : '.imglist a:visible'
});
eg
$().fancybox({
selector : '.imglist a:visible, .owl-item'
});
regards,
Your last snippet works perfectly fine, it is a valid selector - https://api.jquery.com/multiple-selector/
If you have any issue, then, please, create a live demo so it would be possible to investigate your problem and to give a helpful answer.

Is it possible to use an Animate.css alongside a regular CSS?

I'm using a basic setup, but want to animate a
Heading
with slideInRight when one is to scroll down. Sorry, first-time using this and it has perked my interest, I've read the installation pages and the Basic Usage pages.
Thanks!
(EDIT) Hi all, It's appeared to me that my Question was not very accurate, and that I posted this before thinking. My issue that I have now resolved,was that I was attempting to make an entire div section move with 'bounce'. I've, with the awesome suggestion from #ThrowingDwarf I've been able to use a class="" and not an id="" tag. Thanks a ton guys! I hope this helps y'all in future!
As your question is not really clear i am assuming you have a normal CSS file with your markup etc. And you want to have another CSS file for your animations? This is possible, you can have multiple stylesheets. However you need to be careful with names. Do not duplicate names ie. using the same class/id in both files. It can be confusing and can have undesired effects.
To load the second CSS just do it the same way you load up the normal CSS.
Note: elements can have only one ID value but they can have multiple classes.

does anybody know what "|" means in CSS selector

on http://www.w3.org/TR/css3-selectors/#negation
I found interesting selectors
html|*:not(:link):not(:visited)
does anybody knows what "|" means.
In that same page at 6.2.1, it states that the Vertical bar is for selecting elements in a namespace, (in the above example, the html namespace).
See here:
http://www.w3.org/TR/css3-selectors/#univnmsp
You can find more information about it here :
What | means in CSS
It is used to separate namespace and element name in CSS.
Hope it will help you.
These questions seems similar to yours : Using the pipe in css or What does a pipe (|) do in a CSS selector?
It separates namespace and element name.
Unless a default namespace has been defined, |:link is a complicated
way of writing *:link or just :link.

Multiple CSS Classes on a Single Element issue

I'm using a combination of two classes on a span element.
Both look like they're working by themselves... Together they're not.
.black {color:black;}
.size_14 {font-size:14px;}
<span class="black size_14">my text is not black..neither large</span>
I tried changing the size_14 class name for another one (large) and in this case it is working.
Is size_14 an invalid class name?
SOLVED
I was overriding the behaviour with
.article_text_div .size_14 {color:#6D6E71;}
But thanks to this mistake I discovered It's better(?) not to use underscores inside class names
Double thanks
Luca
That example seems to work fine. There must be another rule that is overriding your change. Check the CSS with Firebug or a similar inspector, it will tell you exactly which classes are being used and overridden.
Underscores are not recommended in class names and ID's. Support is mixed across the board. I would remove it or replace it with a dash.
If I were you I'd be inclined to try the following, but without seeing the rest of the code it's difficult to tell if it'll make a difference..
.black{color:black;}
.size-14, span.size-14{font-size:14px;}
You can use underscore, article in above comment was written in 2001. All latest browser supports use of _. But most developer prefer to use "-" for class names.
http://jsfiddle.net/ZsR4A/embedded/result/
Works as expected in IE, FF, Chrome. Make sure your size_14 has higher specificity.

::moz-selection does not apply to input elements

Is there anyway I can get ::moz-selection applied to input elements, even if I have to edit some file in userChrome.css, userContent.css or some similar file?
thanks
The value of an input is not a text-node in the DOM, therefore CSS-selectors will not be able to target it.
According to this question: textarea::selection and ::-moz-selection it's not possible. Maybe it will be in future browsers.

Resources