live() not working inside a plugin
I am writing a plugin and need to live bind a click. The plugin works fine when I do a normal click bind, but not a live bind. I've boiled the plugin down to the basics: (function($) { $.fn.liveBindTest = function() { return this.each(function() { $(this).live('click', function(){ console.log('live click'); return false; }); $(this).click(function(){ console.log('click'); return false; }); }); }; })(jQuery); When I call the plugin
Conflict between EMBED tag and jquery history
We use the jquery history plugin to fix the back button on Ajax pages. We use the embed tag to load flash on an Ajax page. Unfortunately there is a conflict between the two in IE. When I load flash content on an ajax page the meta title is modified to include the hash value of the url even if I don’t modify the title in my code. If load the Ajax content via the object tag the meta title shows properly. Has anyone encountered this problem? Do you know of a workaround? I’d like to continue using the
jQuery syntax guidelines
Hey everyone. I once read the jQuery core code guidelines on the docs page and while reading the jQuery 1.4 source code I could notice some additional rules that were adhered throughout the code. Like no multi-line comments, one line variable declarations, etc. I jotted them down and also posted a blog post with examples on jQuery syntax: - The first thing that I noticed was multiline comments did not use common /* comment */ syntax. In jQuery core all multiline comments use line comment syntax //
<insert plugin name> is not a function
(function($) { // Gets to here $(document).ready(function() { // Does not fire this!! $.widget("ui.dropDownList", {This is the basic problem, it seems the document ready fails to execute at some point, maybe I've overlooked something or some error that has ceased execution. All i know is that 1.3.1 works and 1.4.1 does not execute this. Things to note: It does execute up until a certain point (that i have no idea where it stops firing the ready function) Once
Image Viewer 360 Rotation Plugin
Does anyone know of an existing plugin that does something like the iPad preview image on apple.com? http://www.apple.com/ipad/gallery/#hero-6 I would like to know how much effort it would take to develop an image sequence rotation interaction like on the apple site link I pasted above. I found jQuery reel here: http://jquery.vostrel.cz/reel But that doesn't quite do what I'm looking for. Thanks for the help, Dave
SuperFish - Only works in FF
I have installed a horizontal dropdown Menu and got it working nicely, but I discovered it only works in FF. In IE6, IE7, and IE8, the Main Menu displays the the dropdowns don't. In Chrome and Safari, on hover I can see the dropdown, but it goes away if I move down off the top item. Any ideas on how to fix this?
jquery.validate in chrome field loses focus on unhighlight
This is in Chrome (4) on both Mac and PC. When a field is marked as invalid and your are entering a valid value as soon as the value is valid and validate runs the "unhighlight" function the field loses focus and you must click with the mouse to regain focus. Any suggestions? You cannot add $(element).focus() to the unhighlight function because it runs on blur() so can never escape the field. As it works in every other browser I assume this is a Chrome bug but maybe there is a jQuery fix?
Client-side Image Resizing
I have a UI-based image upload app that currently loads files to a web server for resizing before dropping them in permanent storage. Does anyone know of a library or plug-in that supports client-side image resizing to (1) help with image upload time and (2) reduce server-side processing load? Thanks!
Best practices, scoping, not taking up namespace room...
Just got into jQuery and I am trying to write a wrapper for some existing templating code. I would like to follow best practices from the beginning, so this future jQuery plugins I write aren't a pile of poo. I have been trying to follow some of the online tutorials, but none I've found seem to cover exactly what I want to do; probably more a reflection on my Googling abilities than anything.... :o) Anyway, the base templating code has tow main functions; you call a template creation function on
Event firing order
Hi! I'm building a map picker, similar to a date picker, only it presents a map from Google Maps rather than a calenda. Basically it lets the user select a location and store this information in an input field. It displays on the input field's focus event, and in order to close it, I have bound a click handler to the document which checks what the user actually clicked on by looking at e.target, and if it determines that the user clicked outside of the map picker it stores the map's state as attributes
How to extend the $.curCss ?
I try to extend the curCss with some navigators names like (moz|webkit). Here is my code. It add them in the $.support. But how to extend the $.fn.css and the $.fn.animate with them ? // Extend the jQuery.support with normalized names. // $.support.css = { Name : (Moz|Webkit)Name } jQuery.support.css = (function() { var // Cache cache = {}, body = document.getElementsByTagName('body')[0] , camelcase = function(str){
Developing plugins (adding setter functions)
I've seen the basic plugin authoring howto on jQuery's page here, http://docs.jquery.com/Plugins/Authoring and it's seems pretty straight forward, but there is one thing that it doesn't seem to cover, or I am just missing it. I've managed to create a working plugin such that I can call it with the familiar JQuery notation like so: $('element').myPlugin(); I've also manage to pass in options like so: $('element').myPlugin({ foo: 1, bar: 'test' }); My question is how do I add setter functions