Hi all. I'm using jQuery to swap an embedded flash video (one from vimeo and one from deviantArt) but Firefox 3.6 crashes when the new video is ready to be embedded.
I think it must be something to do with the flash itself as the .click fires correctly and the white background of the new video appears before the crash.
My syntax is correct, I've linked all the scripts I need to, I've done this exact setup on a previous project, using the same code and the same plugins but this time it fails.
No mis-highlighting in Notepad++, no Firebug report, no IE error, no functionality, no odd behaviour. Nothing. It's as if the javascript doesn't even load with the page.
I'm gonna throw this wide open because I just don't have a clue! :(
I'm making a quick and dirty Google Calendar displayer with help from Full Calendar and am struggling to display the details of each Google event correctly. As you may know, if you're not logged into Google Calendar, if you're given an event link or invitation you will be taken to a dynamically generated page displaying the basic details of that event. It includes a <link>ed stylesheet and inline style="..." for each element. I have attached a screenshot of a typical event page.
I'm trying to strip out all the style and just display the content:
eventClick: function(event) {
if (event.url) {
$("#details").hide().load(event.url);
$("#details *").each(function(){
$(this).attr("style", "");
});
$("#details").show();
return false;
}
}
Of course, this isn't working. So what am I doing wrong? How can I change my function to delete the <link> element BEFORE the stylesheet is loaded into memory?
As an aside, you'll notice I'm load() -ing a variable called event.url instead of a string so can't use standard notation to import an HTML fragment. Damn.
I have applied the fadeIn() and fadeOut() effects to a li>ul in my html, but if the user leaves the ul briefly then re-enters it before it has finished fading out, the ul fades back in again. This can happen many times over by accident and it's very annoying.
If the user leaves the ul I want it to fadeOut() and NOT fadeIn() again until the user re-enters the parent li element.
Is there a way of ensuring this? I have done a quick search for while and if/then/else functions but haven't been getting anywhere. This is what I have, very simple indeed:
$(document).ready(function() {
$(".nav ul").hide();
$(".nav li.conductor").hover(function() {
$(".nav ul").fadeIn(200);
},function(){
$(".nav ul").fadeOut(800);
});
});
What should I add/change in the above to make it more robust in terms of user experience?