[jQuery] How can I refresh jQuery object's DOM (after having AJAXed dynamic content)?
Hello list, Is there a way I can refresh the jQuery object's DOM on command so that it can acknowledge content that's been brought in after the initial DOM ready event? Ideally, I'd find something that looked a bit like this: $.get('wad_of_unknown_content.php', someVariableParameters, $.reloadPageDOM()) I've run into the situation where a load of AJAXed content is essentially dead to my jQuery object. I'm surprised at the variety of ways people have dealt with highly specific symptoms of the problem: there are plugins like livequery, which looks to me like an overhead- intensive method for modifying event bindings; then there are a variety of ways of writing functions your dynamic content may be sensitive to into large superfunctions which get called back whenever said dynamic content is loaded. In particular, everything out there seems to be concerned exclusively with event binding on objects within the dynamic content, and the solutions all seem to involve re-writing specific bindings or the functions calling the dynamic content themselves. Why not just get jQuery to read over the existing document as it stands and assimilate that into the jQuery worldview whenever a batch of new content is introduced? Or have insertion methods that edit the document in question and the jQuery DOM object at the same time? Would be very interested to hear alternatives as to how to deal with this.
[jQuery] jQuery and Dreamweaver CS4
Hi - I'm new to the group. This is my first post. I'm a tech writer who's just starting to move into web development. I use Dreamweaver - but some complain that Spry Widgets are lame - and aren't as accessible to keyboard navigation as they should be. I had hoped that by leaning jQuery I could come up with some options. Any advice on where to begin? Thanks, Ev
[jQuery] scrollTo plugin failing with no errors or warnings
Could somebody tell me how this is managing to go wrong? Site is at antoniocaniparoli.co.uk/wip I am trying to animate movement between # locations on the page — the #s being references to images in a gallery. Each image has a little caption at the bottom giving its position in the list and offering href=# links to the next and/or last one in the sequence. As it stands the default behaviour works absolutely fine, but that's all that happens. My syntax (relevant script is at the bottom of antoniocaniparoli.co.uk/wip/antonio.js line 70) appears to be fine, all the right values are getting parsed according to Firebug and I can step through about 60 actions in Firebug with all the right variables showing... But then it just jumps to the next/last image as if there were no scripting at all — with no errors or warnings or anything. Anybody care to take a look and tell me what's missing?
[jQuery] Re: stilted animation in all browsers except Chrome Opera
Am very interested in other errors — that's not a conversation killer! Not able to replicate error — although IE reaching past the front end to screw things up hardly surprises me ;) this is probably down to a very lazy system I have which parses a flickr.com RSS feed whenever the php is called. The 'real' version does a cron job to push that feed into a database, and reads from that when loaded so not too worried about this. Anybody have any problems with jQuery's animation as regards metrics in FF, IE or Safari? This is the issue I'm most interested in. To re- iterate, am currently experiencing a bug in all major browsers except Chrome and Opera whereby the animation 'skips' the first half. I'm pretty sure it's exactly half as well (click next/previous image icons): antoniocaniparoli.co.uk/wip1 On Feb 4, 8:27 pm, Ricardo Tomasi ricardob...@gmail.com wrote: The page doesn't load at all in IE7: Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in E: \domains\a\antoniocaniparoli.co.uk\user\htdocs\wip1\antonio.php on line 4 and other errors. On Feb 4, 3:15 pm, Barney barney.carr...@gmail.com wrote: Hi all! Having a great adventure of my first jQuery website — for ages I'd been telling myself I should just get better at javascript, but I'd been following the development of Sizzle and thought, right, this is great! http://antoniocaniparoli.co.uk/wip1 I am having a bit of a headache with cross-browser compatibilities though. My script has two purposes: positioning and sizing the various elements that constitute a photo gallery, and animating transitions between images. As far as the positioning and sizing is concerned, every major browser (Chrome, FF, IE, Opera, Safari latest stable releases) processes the maths/DOM metrics differently. I expected this out of IE, but it's incredibly distressing that the 'standardised' rendering engines differ so wildly in their interpretation of the same data. If anybody has any insights into this, I'd be very interested. For the moment, FF behaves as I believe everything else should in this matter (apart from:...) My biggest worry is to do with jQuery animation though. The gallery's 'sliding' mechanism — outside of the issue of the bad parsed maths — seems to 'skip' half of the animation in IE, FF Safari. In Chrome and Opera it operates completely smoothly (but doesn't slide to the right location). The animation code is on lines 71-78 ofhttp://antoniocaniparoli.co.uk/wip1/antonio.js: $('#gallery p a:first-child').click(function() { galLeft = parseInt($('#gallery').css('left'))+(vpX-294)/2+'px'; $('#gallery').animate({left: galLeft}, 1500); }) $('#gallery p a:last-child').click(function() { galLeft = parseInt($('#gallery').css('left'))-(vpX-294)/2+'px'; $('#gallery').animate({left: galLeft}, 1500); }) The equation takes the viewport's width and subtracts the offsetWidth of the non-gallery content on the left to give the gallery width — and in theory every item in the gallery has just enough left and right padding to fill the gallery's visible area. Again, all the metrics work in FF. So the real issue is why that animation is stilted in most browsers. Any ideas? NB: People might think this has something to do with the easing plugin I've got in there. I have commented out all reference to it to avoid ambiguity.
[jQuery] stilted animation in all browsers except Chrome Opera
Hi all! Having a great adventure of my first jQuery website — for ages I'd been telling myself I should just get better at javascript, but I'd been following the development of Sizzle and thought, right, this is great! http://antoniocaniparoli.co.uk/wip1 I am having a bit of a headache with cross-browser compatibilities though. My script has two purposes: positioning and sizing the various elements that constitute a photo gallery, and animating transitions between images. As far as the positioning and sizing is concerned, every major browser (Chrome, FF, IE, Opera, Safari latest stable releases) processes the maths/DOM metrics differently. I expected this out of IE, but it's incredibly distressing that the 'standardised' rendering engines differ so wildly in their interpretation of the same data. If anybody has any insights into this, I'd be very interested. For the moment, FF behaves as I believe everything else should in this matter (apart from:...) My biggest worry is to do with jQuery animation though. The gallery's 'sliding' mechanism — outside of the issue of the bad parsed maths — seems to 'skip' half of the animation in IE, FF Safari. In Chrome and Opera it operates completely smoothly (but doesn't slide to the right location). The animation code is on lines 71-78 of http://antoniocaniparoli.co.uk/wip1/antonio.js: $('#gallery p a:first-child').click(function() { galLeft = parseInt($('#gallery').css('left'))+(vpX-294)/2+'px'; $('#gallery').animate({left: galLeft}, 1500); }) $('#gallery p a:last-child').click(function() { galLeft = parseInt($('#gallery').css('left'))-(vpX-294)/2+'px'; $('#gallery').animate({left: galLeft}, 1500); }) The equation takes the viewport's width and subtracts the offsetWidth of the non-gallery content on the left to give the gallery width — and in theory every item in the gallery has just enough left and right padding to fill the gallery's visible area. Again, all the metrics work in FF. So the real issue is why that animation is stilted in most browsers. Any ideas? NB: People might think this has something to do with the easing plugin I've got in there. I have commented out all reference to it to avoid ambiguity.
[jQuery] Does jquery click() always prevent a click-through to the url?
Is this a good way to let the user know that a slow-loading page is coming? $(#menu a).click(function(e){ $.blockUI({ message: h1Loading.../h1 }); location.href = e.target; }) I'm not very familiar with jquery, but as far as I can tell, the .click() function isn't a pass-through... it seems to stop the click in its tracks. Is this so? Peter __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[jQuery] Passing values to functions
Hi, I am trying to get my head around jquery and am converting some standard javascript code over. My old code was setup like this: function deleteid(id){ // Delete by id } Then for html I have: a href=javascript:void(0); id=delete onClick=deleteid('{$entry.cID}') Now moving to jQuery I just can't figure out how to pass the id I want deleted attached to the click function. For example: $(#delete).click(function() { }); How to I pass the id of that row I want deleted? I know this is probably something simple that I am just not getting my head around. : (