, in a big red box it says
This is an old version of the *Selectors* API:
*View the Current API <http://docs.jquery.com/Selectors>*
Old Orange Juice wrote:
IF that's the case,
http://docs.jquery.com/DOM/Traversing/Selectors#Using_CSS_and_XPath_Together
should be changed.
That page says:
Get the input field's value with the name of 'bar':
$("inp...@name=bar]").val();
All checked radio buttons:
$("inp...@type=radio][@checked]")
it also says:
e...@foo=bar] an E element whose "foo" attribute value is exactly equal
to "bar"
which is what I did.. Why all of a sudden Jquery doesn't use '@' in
xpath expressions?
Keep the docs up to date? Are there better up to date docs I should be
looking at??
Thanks again for all the help.. very much appreciated :)
On Aug 4, 8:35 pm, Jules <jwira...@gmail.com> wrote:
jQuery does not recognise @ as attribute indicator. Just remove the @
from your code and enclose the attribute value with ':
$("input:checkbox[name='media_type']").click(function() {
if (this.checked == true) {
alert('checkbox true');
$("div[class='mediafield']").hide
('fast');
});
On Aug 5, 7:55 am, Old Orange Juice <kc2...@gmail.com> wrote:
I have a bunch of divs with the same classname, 'mediafield':
<div id="articles" class="mediafield">Slug:</div><br>
<div id="video" class="mediafield">Big Blurb(Video)<br></div>
<div id="content_short" class="mediafield">Big Blub(short content)
<br></div>
<div id="audio" class="mediafield">Big Blub(Audio)<br></div>
<div id="images" class="mediafield">Photo Uri(images):<br></div>
and I have this jquery code in my header:
<script>
$(document).ready(function() {
$("input:checkb...@name=media_type]").click(function() {
if (this.checked == true) {
alert('checkbox true');
$("d...@class=mediafield]").hide('fast');
});});
</script>
So I know that the click function is getting implemented.. The alert
box appears however I get the following error in firebug:
uncaught exception: Syntax error, unrecognized expression:
[...@class=mediafield]
Line 0
Nothing happens when firebug is turned off... So I'm not sure why it's
throwing the error.
Any help?
Thanks,
ooj