2009/12/3 shapper mdmo...@gmail.com:
alert($.cookies.get(WCA.Player));
var cookie = $.cookies.get(WCA.Player);
if (cookie == null || cookie == 'Play') {
$(#JPlayer).play();
}
Try using === instead of ==
Rafał Pocztarski
Hello,
I have the following code:
alert($.cookies.get(WCA.Player));
var cookie = $.cookies.get(WCA.Player);
if (cookie == null || cookie == 'Play') {
$(#JPlayer).play();
}
The alert gives me the correct value which is null or 'Play' but the
if is not working correctly.
Am I doing
How do you know the 'if' isn't working correctly? It doesn't play? At this
point we don't know if the problem is with the 'if' statement itself or with
the code inside it. Have you put another alert *inside* the if statement to
verify whether it actually gets there or not?
The 'if' statement is
IS that correct sytnax??
On Fri, Jul 31, 2009 at 7:08 PM, Joel Polsky polskystud...@gmail.comwrote:
Like this? (Which doesn't work)
$(input[name=PlannedInvitationsOther]).focus(function(){
$(input[name=PlannedInvitations][value=Other]).attr('checked','checked');
}
);
On Fri, Jul
This problem occurs when a comma is missing. Post your entire code of the
validation.
On Fri, Jul 31, 2009 at 16:00, PictureMan polskystud...@gmail.com wrote:
When I add this rule to a page with the other rules, my page stops
validating.
Works fine if I don't add it.
What this is for is a
Maybe the problem is related to the error message missing } after property
list.
What character does } normally need to be matched up with? How many of
each of those characters do you have?
Another tip: After each { character, indent subsequent lines one more
tabstop. Unindent for each }
I've actually confined (I think) the error to somewhere in the below
code. The 6 lines that are commented out contain the problem, as it
stands now (with commented out sections) the page validates, when I
uncomment either group, I get the same error. I these 2 cases the
required line is looking
I've actually confined (I think) the error to somewhere in the below
code. The 6 lines that are commented out contain the problem, as it
stands now (with commented out sections) the page validates, when I
uncomment either group, I get the same error. I these 2 cases the
required line is looking
You are not closing the brackets in theses rules: PlannedInvitationsOther
and PlannedAttendanceOther
PlannedInvitationsOther: {
required: function(element){ return
$(input=[name='PlannedInvitations'][value='Other']).is(':checked'); },
number: true
},
PlannedAttendanceOther: {
Ah.. one darn missing suqiggly can ruin the whole darn thing...
Another question, related to that...
I want when the user clicks inside the text box, that the matching radio
button becomes the selected button. Hence if they selected 100
invitations,but then decided they want 10,000, thus have
You should have .attr('checked','checked'), by the way you don't need to wrap
your filter by QUOTE
$('input[name=PlannedInvitationsOther]:checked') would work as well
PictureMan wrote:
Ah.. one darn missing suqiggly can ruin the whole darn thing...
Another question, related to that...
Like this? (Which doesn't work)
$(input[name=PlannedInvitationsOther]).focus(function(){
$(input[name=PlannedInvitations][value=Other]).attr('checked','checked');
}
);
On Fri, Jul 31, 2009 at 7:00 PM, FrenchiInLA mamali.sohe...@gmail.comwrote:
You should have
What you want in full jQuery is:
$(#foo).empty().append('br/img src=asdf.gifbr/');
which is the exact equivalent of
$(#foo).html('br/img src=asdf.gifbr/'); // html() does call
this.empty().append()
It is very different from the browser innerHtml since your HTML will
first be parsed by jQuery
I need to replace the contents of #foo.
I would love to use CSS, and if I were starting anew that would be the case,
but unfortunately I am working on an existing application converting the
plain-jane JS to jQuery. I'm simply trying to replace existing functionality
WITHOUT affecting the HTML
Or you could do this:
var img = your image element wrapped in br /s
$('#foo').html(img);
-Hector
On Wed, Dec 17, 2008 at 9:36 AM, brian bally.z...@gmail.com wrote:
On Wed, Dec 17, 2008 at 11:13 AM, ken jqu...@kenman.net wrote:
I need to replace the contents of #foo.
I would love to
On Wed, Dec 17, 2008 at 11:13 AM, ken jqu...@kenman.net wrote:
I need to replace the contents of #foo.
I would love to use CSS, and if I were starting anew that would be the case,
but unfortunately I am working on an existing application converting the
plain-jane JS to jQuery. I'm simply
The problem with that approach is, why even use jQuery for that? Might as
well use .innerHTML = ...
I was hoping to develop a pattern that could be reused, so that the SRC, or
wrapping elements (BR's in this example) can be programmatically set or
modified. This approach does not facilitate that.
That's basically the form I've developed thus far:
var img = jQuery( 'img/' ).attr( 'src', 'image.gif' );
jQuery( '#foo' ).html( img ).prepend( 'br/' ).append( 'br/'
);
It just seems very inelegant contrasted with the 'normal' jQuery usage.
On Wed, Dec 17, 2008 at 11:41
What's wrong with the solution suggested by Kean above? It's prettier
than this and works fine.
$('#foo').html('br/img /br/').find('img').attr
(src,asdf.gif);
- ricardo
On Dec 17, 6:03 pm, ken jqu...@kenman.net wrote:
That's basically the form I've developed thus far:
var img =
You're right, somehow I missed it. Thanks everyone!
On Wed, Dec 17, 2008 at 9:22 PM, Ricardo Tomasi ricardob...@gmail.comwrote:
What's wrong with the solution suggested by Kean above? It's prettier
than this and works fine.
$('#foo').html('br/img /br/').find('img').attr
(src,asdf.gif);
-
Scratch my working example -- the .find( 'img' ) evidently can't find the
image
On Tue, Dec 16, 2008 at 4:50 PM, ken jqu...@kenman.net wrote:
I am trying to do the following:
1) create an IMG
2) assign an SRC to the IMG
3) wrap the IMG in br/'s
4) insert the resultant HTML into #foo
var foo = $(#foo);
foo.html('br/img /br/').find('img').attr(src,asdf.gif);
Tested and working.
find( 'img' ) works for me.
On Dec 16, 3:12 pm, ken jqu...@kenman.net wrote:
Scratch my working example -- the .find( 'img' ) evidently can't find the
image
On Tue, Dec 16, 2008 at 4:50 PM,
On Tue, Dec 16, 2008 at 5:50 PM, ken jqu...@kenman.net wrote:
I am trying to do the following:
1) create an IMG
2) assign an SRC to the IMG
3) wrap the IMG in br/'s
4) insert the resultant HTML into #foo
I have been hammering at this for awhile now, and am having problems; I've
tried
Ken, I wanted to play by your rules BUT agreed with Brian on using CSS
instead of br /
On Dec 16, 5:18 pm, brian bally.z...@gmail.com wrote:
On Tue, Dec 16, 2008 at 5:50 PM, ken jqu...@kenman.net wrote:
I am trying to do the following:
1) create an IMG
2) assign an SRC to the IMG
3)
24 matches
Mail list logo