Silly mistake with jQuery and a CSS ID [Web Development]

I felt like I had to share this story! I was sitting at my desk, stumped, because I was trying to create a logout action for an app using the Facebook API and it seemed like my jQuery selectors were ignoring me. I double checked everything, did some back research on .live() and .on(). Did some more research on delegated events (since I was binding a click event to an element generated after the DOM loads). Nothing. I could NOT get it to work! I decided it might be because I was using an ID selector instead of a Class (you never know the weird things that can cause your program to break) and I noticed that I had the following code: <a id="#logout" href="#!/logout">Logout</a>

Anybody catch my mistake? id="#logout" should NOT have a # sign in it! DOH! Still, it wasn't a total waste. I learned that .live() has been deprecated in favor of using .on() delegated events. You can read more about that  here.

Silly mistake with jQuery and a CSS ID [Web Development]

I felt like I had to share this story! I was sitting at my desk, stumped, because I was trying to create a logout action for an app using the Facebook API and it seemed like my jQuery selectors were ignoring me. I double checked everything, did some back research on .live() and .on(). Did some more research on delegated events (since I was binding a click event to an element generated after the DOM loads). Nothing. I could NOT get it to work! I decided it might be because I was using an ID selector instead of a Class (you never know the weird things that can cause your program to break) and I noticed that I had the following code: Logout

Anybody catch my mistake? id="#logout" should NOT have a # sign in it! DOH! Still, it wasn't a total waste. I learned that .live() has been deprecated in favor of using .on() delegated events. You can read more about that [here].

Silly mistake with jQuery and a CSS ID [Web Development]

I felt like I had to share this story! I was sitting at my desk, stumped, because I was trying to create a logout action for an app using the Facebook API and it seemed like my jQuery selectors were ignoring me. I double checked everything, did some back research on .live() and .on(). Did some more research on delegated events (since I was binding a click event to an element generated after the DOM loads). Nothing. I could NOT get it to work! I decided it might be because I was using an ID selector instead of a Class (you never know the weird things that can cause your program to break) and I noticed that I had the following code: Logout

Anybody catch my mistake? id="#logout" should NOT have a # sign in it! DOH! Still, it wasn't a total waste. I learned that .live() has been deprecated in favor of using .on() delegated events. You can read more about that  here.

Silly mistake with jQuery and a CSS ID [Web Development]

I felt like I had to share this story! I was sitting at my desk, stumped, because I was trying to create a logout action for an app using the Facebook API and it seemed like my jQuery selectors were ignoring me. I double checked everything, did some back research on .live() and .on(). Did some more research on delegated events (since I was binding a click event to an element generated after the DOM loads). Nothing. I could NOT get it to work! I decided it might be because I was using an ID selector instead of a Class (you never know the weird things that can cause your program to break) and I noticed that I had the following code: Logout

Anybody catch my mistake? id="#logout" should NOT have a # sign in it! DOH! Still, it wasn't a total waste. I learned that .live() has been deprecated in favor of using .on() delegated events. You can read more about that  here.

Silly mistake with jQuery and a CSS ID [Web Development]

I felt like I had to share this story! I was sitting at my desk, stumped, because I was trying to create a logout action for an app using the Facebook API and it seemed like my jQuery selectors were ignoring me. I double checked everything, did some back research on .live() and .on(). Did some more research on delegated events (since I was binding a click event to an element generated after the DOM loads). Nothing. I could NOT get it to work! I decided it might be because I was using an ID selector instead of a Class (you never know the weird things that can cause your program to break) and I noticed that I had the following code: Logout

Anybody catch my mistake? id="#logout" should NOT have a # sign in it! DOH! Still, it wasn't a total waste. I learned that .live() has been deprecated in favor of using .on() delegated events. You can read more about that  here.

Silly mistake with jQuery and a CSS ID [Web Development]

I felt like I had to share this story! I was sitting at my desk, stumped, because I was trying to create a logout action for an app using the Facebook API and it seemed like my jQuery selectors were ignoring me. I double checked everything, did some back research on .live() and .on(). Did some more research on delegated events (since I was binding a click event to an element generated after the DOM loads). Nothing. I could NOT get it to work! I decided it might be because I was using an ID selector instead of a Class (you never know the weird things that can cause your program to break) and I noticed that I had the following code: Logout

Anybody catch my mistake? id="#logout" should NOT have a # sign in it! DOH! Still, it wasn't a total waste. I learned that .live() has been deprecated in favor of using .on() delegated events. You can read more about that  here.

Silly mistake with jQuery and a CSS ID [Web Development]

I felt like I had to share this story! I was sitting at my desk, stumped, because I was trying to create a logout action for an app using the Facebook API and it seemed like my jQuery selectors were ignoring me. I double checked everything, did some back research on .live() and .on(). Did some more research on delegated events (since I was binding a click event to an element generated after the DOM loads). Nothing. I could NOT get it to work! I decided it might be because I was using an ID selector instead of a Class (you never know the weird things that can cause your program to break) and I noticed that I had the following code: Logout

Anybody catch my mistake? id="#logout" should NOT have a # sign in it! DOH! Still, it wasn't a total waste. I learned that .live() has been deprecated in favor of using .on() delegated events. You can read more about that  here.

Silly mistake with jQuery and a CSS ID [Web Development]

I felt like I had to share this story! I was sitting at my desk, stumped, because I was trying to create a logout action for an app using the Facebook API and it seemed like my jQuery selectors were ignoring me. I double checked everything, did some back research on .live() and .on(). Did some more research on delegated events (since I was binding a click event to an element generated after the DOM loads). Nothing. I could NOT get it to work! I decided it might be because I was using an ID selector instead of a Class (you never know the weird things that can cause your program to break) and I noticed that I had the following code: <a id=&quot;&logout&quot; href=&quot;#!/logout&quot;>Logout</a>

Anybody catch my mistake? id="#logout" should NOT have a # sign in it! DOH! Still, it wasn't a total waste. I learned that .live() has been deprecated in favor of using .on() delegated events. You can read more about that  here.

jquery waypoints and throttle-debounce

Yesterday I went looking for what people are using to load content when it enters the window (is scrolled to).

I found jQuery waypoints.

Currently I'm using it on the homepage to load the animation of Zeah once it's scrolled to.

Unfortunately the plugin wasn't as easy to implement as I was led to believe. The issues I ran into had to do with altering the DOM with my loading scripts. I set the $.waypoint function to run at the right time (after everything is loaded) and now it seems to be working OK.

The waypoints site has a few demos that I'm dying to try out. Like a sticky nav and ad tracking. I don't ever plan to have ads on my site (especially not the homepage) but it would be useful to know when people are viewing content further down the page or if they're sticking to the first screen.

That brings me to throttle-debounce. I actually saw while looking through the waypoints source that they mention throttling, so I looked it up. Seems like it would be useful to implement on any events/functions that might be triggered several times (like hover overs and animations).

I didn't get a chance to look too much into it, but it's now on my to do list.

What do you use for "waypoints" and script throttling?

Leave you answer in the comments :)

jquery waypoints and throttle-debounce

Yesterday I went looking for what people are using to load content when it enters the window (is scrolled to).

I found jQuery waypoints.

Currently I'm using it on the homepage to load the animation of Zeah once it's scrolled to.

Unfortunately the plugin wasn't as easy to implement as I was led to believe. It had to do with altering the DOM with my preloading scripts. I set the $.waypoint function to run at the right time, it seems to be working OK so far.

The waypoints site has a few demos that I'm dying to try out. Like a sticky nav and ad tracking. I don't ever plan to have ads on my site (especially not the homepage) but it would be useful to know when people are viewing content further down the page or if they're sticking to the first screen.

That brings me to throttle-debounce. I actually saw while looking through the waypoints source that they mention throttling, so I looked it up. Seems like it would be useful to implement on any events/functions that might be triggered several times (like hover overs and animations).

I didn't get a chance to look too much into it, but it's now on my to do list.

What do you use for "waypoints" and script throttling?

jquery waypoints and throttle-debounce

Yesterday I went looking for what people are using to load content when it enters the window (is scrolled to).

I found jQuery waypoints.

Currently I'm using it on the homepage to load the animation of Zeah once it's scrolled to.

Unfortunately the plugin wasn't as easy to implement as I was led to believe. It had to do with altering the DOM with my preloading scripts. I set the $.waypoint function to run at the right time, it seems to be working OK so far.

The waypoints site has a few demos that I'm dying to try out. Like a sticky nav and ad tracking. I don't ever plan to have ads on my site (especially not the homepage) but it would be useful to know when people are viewing content further down the page or if they're sticking to the first screen.

That brings me to throttle-debounce. I actually saw while looking through the waypoints source that they mention throttling, so I looked it up. Seems like it would be useful to implement on any events/functions that might be triggered several times (like hover overs and animations).

I didn't get a chance to look too much into it, but it's now on my to do list.

What do you use for "waypoints" and script throttling?

Leave you answer in the comments :)

Simple placeholder text for input fields using jQuery

Today I came across a form using inline javascript events for placeholders:
[html]
<div class="inputBG" align="center">
<input name="company" id="company" type="text" placeholder="Company Name" onBlur="if (this.value == '') {this.value = 'Company Name';}" onFocus="if (this.value == 'Company Name') {this.value = '';}" />
</div>
[/html]
This is a no-no.

Instead, use this:

HTML

[html]<input id="name" type="text" name="name" placeholder="placeholder name">[/html]

 jQuery

[javascript]
// only necessary for browsers that don't support the placeholder attribute
$(document).ready(function(){
$('input').each(function(i,v){
// set initial values
$(this).val($(this).attr('placeholder'));
});
});

$('input').on({
'click': function(){ // clear the placeholder
if( $(this).val() == $(this).attr('placeholder')){ $(this).val(''); }
},
'blur': function(){ // reset the placeholder
if( $(this).val() == ''){ $(this).val($(this).attr('placeholder')); }
}
});
[/javascript]

And all is good and right in the world.

I'm assuming you have a basic understanding of document structure and how to implement jQuery.

If you have any questions, please ask.

Simple placeholder text for input fields using jQuery

Today I came across a form using inline javascript events for placeholders:
[html]<div class="inputBG" align="center"><input name="company" id="company" type="text" placeholder="Company Name" onBlur="if (this.value == '') {this.value = 'Company Name';}" onFocus="if (this.value == 'Company Name') {this.value = '';}" /></div>[/html]
This is a no-no.

Instead, use this:

HTML

[html]<input id="name" type="text" name="name" placeholder="placeholder name">[/html]


 jQuery

[javascript]
// only necessary for browsers that don't support the placeholder attribute
$(document).ready(function(){
$('input').each(function(i,v){
// set initial values
$(this).val($(this).attr('placeholder'));
});
});

$('input').on({
'click': function(){ // clear the placeholder
if( $(this).val() == $(this).attr('placeholder')){ $(this).val(''); }
},
'blur': function(){ // reset the placeholder
if( $(this).val() == ''){ $(this).val($(this).attr('placeholder')); }
}
});
[/javascript]

And all is good and right in the world.

I'm assuming you have a basic understanding of document structure and how to implement jQuery.

If you have any questions, please ask.

Simple placeholder text for input fields using jQuery

Today I came across a form using inline javascript events for placeholders:
[html]&lt;div class="inputBG" align="center"&gt;&lt;input name="company" id="company" type="text" placeholder="Company Name" onBlur="if (this.value == '') {this.value = 'Company Name';}" onFocus="if (this.value == 'Company Name') {this.value = '';}" /&gt;&lt;/div&gt;[/html]
This is a no-no.

Instead, use this:

HTML

[html]&lt;input id="name" type="text" name="name" placeholder="placeholder name" /&gt;[/html]


 jQuery

[javascript]
// only necessary for browsers that don't support the placeholder attribute
$(document).ready(function(){
$('input').each(function(i,v){
// set initial values
$(this).val($(this).attr('placeholder'));
});
});

$('input').on({
'click': function(){ // clear the placeholder
if( $(this).val() == $(this).attr('placeholder')){ $(this).val(''); }
},
'blur': function(){ // reset the placeholder
if( $(this).val() == ''){ $(this).val($(this).attr('placeholder')); }
}
});
[/javascript]

And all is good and right in the world.

I'm assuming you have a basic understanding of document structure and how to implement jQuery.

If you have any questions, please ask.

Simple placeholder text for input fields using jQuery

Today I came across a form using inline javascript events for placeholders:
<div class="inputBG" align="center"><input name="company" id="company" type="text" placeholder="Company Name" onBlur="if (this.value == '') {this.value = 'Company Name';}" onFocus="if (this.value == 'Company Name') {this.value = '';}" /></div>

This is a no-no.

Instead, use this:

HTML
<input id="name" type="text" name="name" placeholder="placeholder name" />

 jQuery
$(document).on('load', function(){
$('input[type=text]').each(function(i,v){
// set initial values
$(this).val($(this).attr('placeholder'));
});
}

$('input').on('click',function(){
if($(this).val() == $(this).attr('placeholder')){ $(this).val(''); }
});

And all is good and right in the world.

I'm assuming you have a basic understanding o

If you have any questions, please ask.

Simple placeholder text for input fields using jQuery

Today I came across a form using inline javascript events for placeholders:
<div class="inputBG" align="center"><input name="company" id="company" type="text" placeholder="Company Name" onBlur="if (this.value == '') {this.value = 'Company Name';}" onFocus="if (this.value == 'Company Name') {this.value = '';}" /></div>

This is a no-no.

Instead, use this:

HTML
<input id="name" type="text" name="name" placeholder="placeholder name" />

 jQuery
$(document).on('load', function(){
$('input[type=text]').each(function(i,v){
// set initial values
$(this).val($(this).attr('placeholder'));
});
}

$('input').on('click',function(){
if($(this).val() == $(this).attr('placeholder')){ $(this).val(''); }
});

And all is good and right in the world.

I'm assuming you have a basic understanding of document structure and how to implement jQuery.

If you have any questions, please ask.

Simple placeholder text for input fields using jQuery

Today I came across a form using inline javascript events for placeholders:
<div class="inputBG" align="center"><input name="company" id="company" type="text" placeholder="Company Name" onBlur="if (this.value == '') {this.value = 'Company Name';}" onFocus="if (this.value == 'Company Name') {this.value = '';}" /></div>

This is a no-no.

Instead, use this:

HTML
<input id="name" type="text" name="name" placeholder="placeholder name" />

 jQuery
$(document).on('load', function(){
$('input[type=text]').each(function(i,v){
// set initial values
$(this).val($(this).attr('placeholder'));
});
}

$('input').on('click',function(){
if($(this).val() == $(this).attr('placeholder')){ $(this).val(''); }
});

And all is good and right in the world.

I'm assuming you have a basic understanding of document structure and how to implement jQuery.

If you have any questions, please ask.

Simple placeholder text for input fields using jQuery

Today I came across a form using inline javascript events for placeholders:
<div class="inputBG" align="center"><input name="company" id="company" type="text" placeholder="Company Name" onBlur="if (this.value == '') {this.value = 'Company Name';}" onFocus="if (this.value == 'Company Name') {this.value = '';}" /></div>

This is a no-no.

Instead, use this:

HTML
<input id="name" type="text" name="name" placeholder="placeholder name" />

 jQuery
[javascript]
// only necessary for browsers that don't support the placeholder attribute
$(document).ready(function(){
  $('input').each(function(i,v){
      // set initial values
      $(this).val($(this).attr('placeholder'));
  });
});

$('input').on({
     'click': function(){ // clear the placeholder
           if( $(this).val() == $(this).attr('placeholder')){ $(this).val(''); }
      },
     'blur': function(){ // reset the placeholder
           if( $(this).val() == ''){ $(this).val($(this).attr('placeholder')); }
     }
});
[/javascript]
And all is good and right in the world.

I'm assuming you have a basic understanding of document structure and how to implement jQuery.

If you have any questions, please ask.

Simple placeholder text for input fields using jQuery

Today I came across a form using inline javascript events for placeholders:
<div class="inputBG" align="center"><input name="company" id="company" type="text" placeholder="Company Name" onBlur="if (this.value == '') {this.value = 'Company Name';}" onFocus="if (this.value == 'Company Name') {this.value = '';}" /></div>

This is a no-no.

Instead, use this:

HTML
<input id="name" type="text" name="name" placeholder="placeholder name" />

 jQuery
$(document).on('load', function(){
$('input[type=text]').each(function(i,v){
// set initial values
$(this).val($(this).attr('placeholder'));
});
}

$('input').on('click',function(){
if($(this).val() == $(this).attr('placeholder')){ $(this).val(''); }
});

And all is good and right in the world.

I'm assuming you have a basic understanding of document structure and how to implement jQuery.

If you have any questions, please ask.

Simple placeholder text for input fields using jQuery

Today I came across a form using inline javascript events for placeholders:
<div class="inputBG" align="center"><input name="company" id="company" type="text" placeholder="Company Name" onBlur="if (this.value == '') {this.value = 'Company Name';}" onFocus="if (this.value == 'Company Name') {this.value = '';}" /></div>

This is a no-no.

Instead, use this:

HTML
<input id="name" type="text" name="name" placeholder="placeholder name" />

 jQuery
// only necessary for browsers that don't support the placeholder attribute
$(document).on('load', function(){
$('input[type=text]').each(function(i,v){
// set initial values
$(this).val($(this).attr('placeholder'));
});
}

$('input').on('click',function(){
if($(this).val() == $(this).attr('placeholder')){ $(this).val(''); }
});

And all is good and right in the world.

I'm assuming you have a basic understanding of document structure and how to implement jQuery.

If you have any questions, please ask.

Simple placeholder text for input fields using jQuery

Today I came across a form using inline javascript events for placeholders:
<div class="inputBG" align="center"><input name="company" id="company" type="text" placeholder="Company Name" onBlur="if (this.value == '') {this.value = 'Company Name';}" onFocus="if (this.value == 'Company Name') {this.value = '';}" /></div>

This is a no-no.

Instead, use this:

HTML
<input id="name" type="text" name="name" placeholder="placeholder name" />

 jQuery
// only necessary for browsers that don't support the placeholder attribute
$(document).ready(function(){
  $('input').each(function(i,v){
      // set initial values
      $(this).val($(this).attr('placeholder'));
           console.log($(this).val());
  });
});
 
$('input').on({
     'click': function(){
           if( $(this).val() == $(this).attr('placeholder')){ $(this).val(''); }
      },
     'blur': function(){
           if( $(this).val() == ''){ $(this).val($(this).attr('placeholder')); }
     }
});

And all is good and right in the world.

I'm assuming you have a basic understanding of document structure and how to implement jQuery.

If you have any questions, please ask.

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

x-frame-optionsWHAT!?

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

Lol they're having issues too.

Yeah, the Youtube Player Demo is having an error.

Not a good sign..

Update 3: Back up!

Other humans who shared in this experience (and wrote about it)

http://jakebot.com/2013/youtube-breaks-embeds-everywhere

http://seanmccambridge.com/2013/02/06/youtube-iframe-embeds-down/

http://retrohelix.com/2013/02/is-youtubes-iframe-broken/

Love you Internets! 8-]

Did you find what you're looking for? Tell me about it in the comments!

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

WHAT!?

x-frame-options

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

WHAT!?

x-frame-options

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

youtube-embed-errorLol they're having issues too.

 

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

WHAT!?

x-frame-options

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

youtube-embed-errorLol they're having issues too.

 

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

WHAT!?

x-frame-options

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

youtube-embed-errorLol they're having issues too.

Yeah, the Youtube Player Demo is having an error.

Not a good sign..

 

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

WHAT!?

x-frame-options

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

youtube-embed-errorLol they're having issues too.

Yeah, the Youtube Player Demo is having an error.

Not a good sign..

Update 3: Back up!

 

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

WHAT!?

x-frame-options

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

youtube-embed-errorLol they're having issues too.

Yeah, the Youtube Player Demo is having an error.

Not a good sign..

Update 3: Back up!

 

Other humans who shared in this experience (and wrote about it)

http://jakebot.com/2013/youtube-breaks-embeds-everywhere

http://seanmccambridge.com/2013/02/06/youtube-iframe-embeds-down/

http://retrohelix.com/2013/02/is-youtubes-iframe-broken/

Love you Internets! 8-]

 

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

WHAT!?

x-frame-options

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

youtube-embed-errorLol they're having issues too.

Yeah, the Youtube Player Demo is having an error.

Not a good sign..

Update 3: Back up!

 

Other humans sharing in this experience (and writing about it)

http://jakebot.com/2013/youtube-breaks-embeds-everywhere

http://seanmccambridge.com/2013/02/06/youtube-iframe-embeds-down/

http://retrohelix.com/2013/02/is-youtubes-iframe-broken/?utm_source=feedburner&utm_medium=twitter&utm_campaign=Feed%3A+retrohelix+%28RETROhelix%29

 

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

WHAT!?

x-frame-options

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

youtube-embed-errorLol they're having issues too.

Yeah, the Youtube Player Demo is having an error.

Not a good sign..

Update 3: Back up!

Other humans who shared in this experience (and wrote about it)

http://jakebot.com/2013/youtube-breaks-embeds-everywhere

http://seanmccambridge.com/2013/02/06/youtube-iframe-embeds-down/

http://retrohelix.com/2013/02/is-youtubes-iframe-broken/

Love you Internets! 8-]

 

Did you find what you're looking for? Tell me about it in the comments!

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

x-frame-optionsWHAT!?

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

Lol they're having issues too.

Yeah, the Youtube Player Demo is having an error.

Not a good sign..

Update 3: Back up!

Other humans who shared in this experience (and wrote about it)

http://jakebot.com/2013/youtube-breaks-embeds-everywhere

http://seanmccambridge.com/2013/02/06/youtube-iframe-embeds-down/

http://retrohelix.com/2013/02/is-youtubes-iframe-broken/

Love you Internets! 8-]

Did you find what you're looking for? Tell me about it in the comments!

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

WHAT!?

x-frame-options

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

youtube-embed-errorLol they're having issues too.

Yeah, the Youtube Player Demo is having an error.

Not a good sign..

Update 3: Back up!

Other humans who shared in this experience (and wrote about it)

http://jakebot.com/2013/youtube-breaks-embeds-everywhere

http://seanmccambridge.com/2013/02/06/youtube-iframe-embeds-down/

http://retrohelix.com/2013/02/is-youtubes-iframe-broken/

Love you Internets! 8-]

Did you find what you're looking for? Tell me about it in the comments!

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

x-frame-optionsWHAT!?

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

Lol they're having issues too.

Yeah, the Youtube Player Demo is having an error.

Not a good sign..

Update 3: Back up!

Other humans who shared in this experience (and wrote about it)

http://jakebot.com/2013/youtube-breaks-embeds-everywhere

http://seanmccambridge.com/2013/02/06/youtube-iframe-embeds-down/

http://retrohelix.com/2013/02/is-youtubes-iframe-broken/

Love you Internets! 8-]

Did you find what you're looking for? Tell me about it in the comments!

Youtube: Load denied by X-Frame-Options

Load denied by X-Frame-Options: http://www.youtube.com/embed/wtI6TL516pU does not permit cross-origin framing.

x-frame-optionsWHAT!?

When loading an iframe with $.prop('src', src)

Keep calm and switch to Youtube API.

But, it's annoying.

Also, Chrome doesn't give me this error.

Update: Actually Chrome is now giving me this error too.

Did Youtube change something?

Update 2: Tried HTTPS (still didn't work)

Went to Youtube Developer site to try alternative methods (always nice to have a backup) & guess what I found!

Lol they're having issues too.

Yeah, the Youtube Player Demo is having an error.

Not a good sign..

Update 3: Back up!

Other humans who shared in this experience (and wrote about it)

http://jakebot.com/2013/youtube-breaks-embeds-everywhere

http://seanmccambridge.com/2013/02/06/youtube-iframe-embeds-down/

http://retrohelix.com/2013/02/is-youtubes-iframe-broken/

Love you Internets! 8-]

Did you find what you're looking for? Tell me about it in the comments!

Simple placeholder text for input fields using jQuery

Today I came across a form using inline javascript events for placeholders:
[html]
<div class="inputBG" align="center">
<input name="company" id="company" type="text" placeholder="Company Name" onBlur="if (this.value == '') {this.value = 'Company Name';}" onFocus="if (this.value == 'Company Name') {this.value = '';}" />
</div>
[/html]
This is a no-no.

Instead, use this:

HTML

[html]<input id="name" type="text" name="name" placeholder="placeholder name">[/html]

 jQuery

[javascript]
// only necessary for browsers that don't support the placeholder attribute
$(document).ready(function(){
$('input').each(function(i,v){
// set initial values
$(this).val($(this).attr('placeholder'));
});
});

$('input').on({
'click': function(){ // clear the placeholder
if( $(this).val() == $(this).attr('placeholder')){ $(this).val(''); }
},
'blur': function(){ // reset the placeholder
if( $(this).val() == ''){ $(this).val($(this).attr('placeholder')); }
}
});
[/javascript]

And all is good and right in the world.

I'm assuming you have a basic understanding of document structure and how to implement jQuery.

If you have any questions, please ask.