jQuery not working inside Fancybox ?! |
This is a discussion on jQuery not working inside Fancybox ?! within the Javascript forums, part of the Development category; Hi there, I use Fancybox to call my contact page via the ajax method. Inside my contact form I use ... |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 |
![]() | Hi there, I use Fancybox to call my contact page via the ajax method. Inside my contact form I use jQuery Blinking Fields: html: <input type="text" class="blink" title="foo bar" value="foo bar"> jQuery: $(function(){ $('.blink'). focus(function() { if(this.title==this.value) { this.value = ''; } }). blur(function(){ if(this.value=='') { this.value = this.title; } }); }) -------------------------------------------------------------------------------------------------------------------------------------------------------------- The fancybox works fine except that the blinking fields don't not work inside. Do you have any ideas how to fix that ? I'm providing you a demo version. The site is on bulgarian language so you have to follow these steps: http://demo.web380.com 1. When prompted for username and password use: 1.2 username: demo 1.3 password: demo 2. On the home page use the top navigation. Click on far right link labeled <ЗА КОНТАКТИ>. Тhen you will see the contact page with fancybox. The form fields should <blink> when you click inside. |
| | |
| | #2 |
| Senior Member Join Date: Jan 2009
Posts: 980
Thanks: 56
Thanked 14 Times in 14 Posts
![]() |
Im not getting any blink on the form fields here and to be honest I think it looks great without, I dont have any ideas on getting that fixed though :)
|
| | |
| | #3 |
![]() | Well, they don't blink because they don't work. This method is used when you don't have labels, but you have to show the user what's that field. And It's a lot easier to click and get a blank field instead of click and remove the value.
|
| | |
| | #4 |
![]() Join Date: Dec 2008
Posts: 717
Thanks: 0
Thanked 38 Times in 38 Posts
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Expertise: Design & Graphics Experience: Professional |
All I can suggest is that as the form does not appear to exist in the current document until after your function it will not be affected by it. Assuming the contact form is held in a separate file and loaded by ajax, try adding function after the contact form markup.
__________________ Jon Warner Web Pro Cafe :: The PixelForge :: Follow my Twits (or something) :: LinkedIn |
| | |
![]() |
| Tags |
| fancybox, inside, jquery, not-working |
| Thread Tools | |
| Display Modes | |