[jQuery] Re: sometimes lenght property does not work but size() does return correct value
It's length, not lenght. -- Ariel Flesler On Dec 13, 5:59 am, manko uha...@gmail.com wrote: Sometimes $('p').lenght returns undefiend property but when i replace lenght with size() method i get the correct number of p elements in current dom ??
Re: [jQuery] Re: Scroll so that an element is at the bottom of the viewport
This should do. $.scrollTo('#elem', 1000, { over:{ top:0.5 }, offset:{ top: -$(window).height() / 2 } }); On Sun, Nov 15, 2009 at 10:35 AM, Rizky br4inwas...@gmail.com wrote: hi ariel, great plugin here, i'm using it for my next project (if the marketing guys could win the pitch). currently it's still a prototype. i have a question as well. what should i do if i want to scroll to an element and make it appear in the center of the viewport? all elements are absolutely positioned. thx for the help. -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: Scroll so that an element is at the bottom of the viewport
$.scrollTo('#elem', 1000, { over:{ top:1 }, offset:{ top: -$(window).height() } }); Haven't tried it, but this should do. If it doesn't, you could just calculate the position using simple math. -- Ariel Flesler On Nov 2, 8:28 am, Deniz Dogan deniz.a.m.do...@gmail.com wrote: I'm looking for a JQuery plugin like scrollTo but which lets me scroll the viewport so that the bottom of an element is at the bottom of the viewport. Is this possible with scrollTo? If so, how? Otherwise, is there any other plugin I can use?
[jQuery] Re: $.Event is not a function js/jquery/ui.core.js Line 345
Can you provide a link to the page where you see this error? -- Ariel Flesler http://flesler.blogspot.com On Oct 22, 1:32 pm, Maskime maxime.f...@gmail.com wrote: Hi all, I'm having the following error when opening a dialog $.Event is not a function js/jquery/ui.core.js Line 345 I don't really understand what's happening since i'm using this code to load dialog in many places in my application an it's the first time that i'm having this problem... If any one has an idea, it's more than welcome :) Thank you in advance.
[jQuery] Re: $.Event is not a function js/jquery/ui.core.js Line 345
Could be that you're using an old version of jQuery (prior to 1.3.x?) On Thu, Oct 22, 2009 at 1:03 PM, Maxime FAYE maxime.f...@gmail.com wrote: Sorry no... But i can give you the code that is generting the error : var sDialogId = divPleaseActionDialog; var sDialog = ; var oButtons = {}; oButtons[aTranslations[ok]] = function(){ $j('#' + sDialogId).dialog('destroy'); }; sDialog += 'div id=' + sDialogId + '' + \n; sDialog += 'Please select at least one action'; sDialog += '/div' + \n; $j('body').append(sDialog); alert($j('#' + sDialogId).length); $j('#' + sDialogId).dialog({ modal:true, buttons:oButtons, height:300, width:500, stack:true, title:aTranslations['error'], close:function() { $j('#' + sDialogId).dialog('destroy'); } }); It seems that the error occure when jQuery launch the dialog 2009/10/22 Ariel Flesler afles...@gmail.com Can you provide a link to the page where you see this error? -- Ariel Flesler http://flesler.blogspot.com On Oct 22, 1:32 pm, Maskime maxime.f...@gmail.com wrote: Hi all, I'm having the following error when opening a dialog $.Event is not a function js/jquery/ui.core.js Line 345 I don't really understand what's happening since i'm using this code to load dialog in many places in my application an it's the first time that i'm having this problem... If any one has an idea, it's more than welcome :) Thank you in advance. -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: Scroll To After AJAX Request...
Include jQuery.scrollTo[1] and then, everytime the Ajax response arrives: $.scrollTo(0, 1000); Where 1000 is how many milliseconds to animate. You can of course add more settings as needed. [1] http://flesler.blogspot.com/2007/10/jqueryscrollto.html -- Ariel Flesler On Aug 23, 9:34 pm, Erik R. Peterson eriks...@mac.com wrote: Any one can help with a script to scroll to the top of the page AFTER an AJAX REQUEST loading a div? Erik
[jQuery] Re: localscroll not working, help? could it be lightbox?
It currently works for me, and yeah, don't spam ;) -- Ariel Flesler On Aug 23, 8:18 pm, Alice kikizi...@gmail.com wrote: problem can be seen here:http://unedible.com/alicewhite/ it's just not scrolling. sometimes when i change the code around a bit, the anchor images stop working completely. i'm also using lightbox, could that be the issue?
[jQuery] Re: Scroll to top of page after AJAX load.....
Ah, saw this one after the other. Got a link to what you've been trying to achieve ? -- Ariel Flesler On Aug 23, 7:03 pm, Erik eriks...@mac.com wrote: Using AJAX to load content within a div. Need to find a way to scroll to the top of the page after loading content inside div on same page. After clicking on my bottom links, loading the html inside the div, I want the the parent window to scroll up to the top. scrollTo did not work. Help! Erik
[jQuery] Re: jQuery localScroll target problem
That should work correctly. Do you have a demo online ? -- Ariel Flesler On Jul 2, 3:55 pm, Frozzare fredrik.for...@gmail.com wrote: Hello. I don't get jquery localscroll target setting work right. I want to scroll the div's in #content div, but it's not working. my js code: $(document).ready(function() { $('ul.nav').localScroll({ target: '#content', axis: 'xy', queue: true }); }); my html code: div id=left class=left ul class=nav lia href=#homeHem/a/li lia href=#aboutOm mig/a/li lia href=#workMitt arbete/a/li lia href=#contactKontakt/a/li /ul /div div id=content class=page right div id=home h3 Hem/h3 /div div id=about h3 Om mig/h3 /div div id=work h3 Mitt arbete/h3 /div div id=contact h3 Kontakt/h3 /div /div
[jQuery] Re: animate scrollTop
It won't work on all major browsers. Not all of them support scrolling when applied to 'html', some require 'body'. This varies depending on whether you're on quirks mode or not. It's even more problematic when animating iframes. -- Ariel Flesler On May 30, 1:52 pm, GaVrA ga...@crtaci.info wrote: Everything is fine. It turns out i have putted this script on wrong place so it was imported and runned 20 times... Dont ask why... lol Like i said - now it works like a charm... :) On May 30, 5:17 pm, GaVrA ga...@crtaci.info wrote: I said $('html') is working... Please read more carefully... What i need is a fix for this function becouse it is still being animated for a small period of time, after it reach top. It seems that if you have that anchor relativly close to the top, this bug have more chance to show, and for instance if anchor is way down then it works like it should... _ On May 30, 5:06 pm, waseem sabjee waseemsab...@gmail.com wrote: $('a.goToTop').click(function() { $(this).animate({scrollTop : 0},'slow'); }); OR $('a.goToTop').click( function() { $().animate({scrollTop : 0},'slow'); }); On Sat, May 30, 2009 at 4:55 PM, GaVrA ga...@crtaci.info wrote: If you mean just to remove html with body - that wont work... Already tried it. On May 30, 4:50 pm, waseem sabjee waseemsab...@gmail.com wrote: $('a.goToTop').click(function( ) { $('body').animate({scrollTop : 0},'slow'); }); On Sat, May 30, 2009 at 4:29 PM, GaVrA ga...@crtaci.info wrote: Hi! I am using this code: $('a.goToTop').click(function() { $('html').animate({scrollTop : 0},'slow'); }); And it works like it should. Problem is that sometimes it just bugs out for short period of time, like when you click anchor and it scroll's to top, if you then try to use scroll on mouse to scroll down it just keep returning you to top... :( And after that short period of time it stop's doing that. Any idea how to fix this? Something like when it reach top to stop working or something like that.
[jQuery] [ANN] 2 Ajax plugins for jQuery +1.3
Hi All I never actually announced these 2 small plugins I made right before jQuery 1.3 was released. They're meant to provide users with a nicer way of using certain new ajax features that could be conflicting otherwise. Here's the link: http://flesler.blogspot.com/2009/05/2-ajax-plugins-for-jquery-13.html Cheers -- Ariel Flesler
[jQuery] Re: Overriding jQuery methods
I haven't formally released it yet, but feel free to use it: http://test.flesler.com/jquery.broadcast/jquery.broadcast.js Precarious demo: http://test.flesler.com/jquery.broadcast/ Cheers -- Ariel Flesler On May 28, 5:51 am, Andho and...@gmail.com wrote: I need to override a jQuery method, more specifically the animate method. My aim is for jQuery to trigger an event ( eg. trigger('animate') or trigger('fadeOut') ) so that one can hook to these events within other code. I don't understand advanced javascript object oriented programming and couldn't find a solution on the net I also think that this will be good addition to the jQuery core. Thanks Andho
[jQuery] Re: $().someFunction(); -- The First Pair of Parentheses?
FYI, not anymore. $() === $([]) It now returns an empty jQuery collection -- Ariel Flesler On May 3, 5:22 am, Klaus Hartl klaus.ha...@googlemail.com wrote: $() === $(document) --Klaus On 3 Mai, 07:39, kiusau kiu...@mac.com wrote: QUESTION: What does the first pair of parentheses indicate in the following statement: $().getBrowserInformation(); BACKGROUND: I have noticed that their presence or absence can make or break JavaScript's acknowledgement of a method's existence on the one hand, but seem entirely unnecessary under other circumstances. Roddy
[jQuery] Re: $().someFunction(); -- The First Pair of Parentheses?
Correction: $() === $(document) $(null) === $([]) $() === $([]) This is wrongly documented and has orphaned code, will report. -- Ariel Flesler On May 3, 12:16 pm, Ariel Flesler afles...@gmail.com wrote: FYI, not anymore. $() === $([]) It now returns an empty jQuery collection -- Ariel Flesler On May 3, 5:22 am, Klaus Hartl klaus.ha...@googlemail.com wrote: $() === $(document) --Klaus On 3 Mai, 07:39, kiusau kiu...@mac.com wrote: QUESTION: What does the first pair of parentheses indicate in the following statement: $().getBrowserInformation(); BACKGROUND: I have noticed that their presence or absence can make or break JavaScript's acknowledgement of a method's existence on the one hand, but seem entirely unnecessary under other circumstances. Roddy
[jQuery] Re: $().someFunction(); -- The First Pair of Parentheses?
Fixed: http://dev.jquery.com/changeset/6334 $() === $(document) $(undefined) === $([]) $(null) === $([]) $() === $([]) -- Ariel Flesler On May 3, 12:28 pm, Ariel Flesler afles...@gmail.com wrote: Correction: $() === $(document) $(null) === $([]) $() === $([]) This is wrongly documented and has orphaned code, will report. -- Ariel Flesler On May 3, 12:16 pm, Ariel Flesler afles...@gmail.com wrote: FYI, not anymore. $() === $([]) It now returns an empty jQuery collection -- Ariel Flesler On May 3, 5:22 am, Klaus Hartl klaus.ha...@googlemail.com wrote: $() === $(document) --Klaus On 3 Mai, 07:39, kiusau kiu...@mac.com wrote: QUESTION: What does the first pair of parentheses indicate in the following statement: $().getBrowserInformation(); BACKGROUND: I have noticed that their presence or absence can make or break JavaScript's acknowledgement of a method's existence on the one hand, but seem entirely unnecessary under other circumstances. Roddy
[jQuery] Re: serialScroll option : start -- no effect
Your 'items' selector ('li') is not JUST matching the panes, but other LIs as well. The plugin is indeed scrolling to the forth LI within the container. Cheers On Fri, Apr 24, 2009 at 2:37 PM, Niels niels.siem...@gmail.com wrote: Sorry for my late response. here is the demo: If you click on: http://www.egoactive.com/transfer/jquery-demo/#technical/django It shouls scroll to item # 3... As we defined in de serialScroll methode (interfase.js): start: 3 Thanks in advance On Apr 14, 1:16 am, Ariel Flesler afles...@gmail.com wrote: Can you provide a demo online ? Cheers -- Ariel Flesler On Apr 10, 6:17 am, Niels niels.siem...@gmail.com wrote: We're using the serialScroll method and using some of the options. Only the option start has no effect. We want to scroll at the start to element 2 and not to the default position 0 Suggestions? $('#technical').serialScroll({ target:'#technical-sections', items:'li', // Selector to the items ( relative to the matched elements, '#sections' in this case ) axis:'x',// The default is 'y' scroll on both ways navigation:'#technical-navigation li a', duration:900,// Length of the animation (if you scroll 2 axes and use queue, then each axis take half this time) force: true, // Force a scroll to the element specified by 'start' (some browsers don't reset on refreshes) constant: false, // constant speed lock:false, // Ignore events if already animating (true by default) //prev:'img.prev',// Selector to the 'prev' button (absolute!, meaning it's relative to the document) //next:'img.next',// Selector to the 'next' button (absolute too) //queue:false,// We scroll on both axes, scroll both at the same time. //event:'click',// On which event to react (click is the default, you probably won't need to specify it) //stop:false,// Each click will stop any previous animations of the target. (false by default) //lock:true, // Ignore events if already animating (true by default) start: 2, // On which element (index) to begin ( 0 is the default, redundant in this case ) //cycle:true,// Cycle endlessly ( constant velocity, true is the default ) //step:1, // How many items to scroll each time ( 1 is the default, no need to specify ) jump:true, // If true, items become clickable (or w/e 'event' is, and when activated, the pane scrolls to them) //lazy:false,// (default) if true, the plugin looks for the items on each event(allows AJAX or JS content, or reordering) //interval:1000, // It's the number of milliseconds to automatically go to the next -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: localScroll not working in Internet Explorer
Haven't gotten too deep when checking it.. but I advice you to use serialScroll for the prev/next part. It integrates perfectly with localScroll and both would share one single scrollTo so it's just a few more bytes. Cheers -- Ariel Flesler On Apr 17, 5:06 pm, Dan Pouliot danpoul...@gmail.com wrote: I have a web form that I'm using localScroll to 'paginate' the form...https://www.omansion.com/weddings_and_parties/event_request_form/ The form scrolls to the right perfectly in Firefox and Safari, but not internet explorer (6 or 7). It has something to do with the fact that the hrefs of the previous/ next buttons on the page are assigned dynamically. If I hard code the previous and next button hrefs, it works fine in IE. Unfortunately it is REALLY cumbersome to re-code this page with hard coded buttons. I'd like to keep them dynamic if possible. I don't know much about binding, is this a binding issue? Any ideas would be greatly appreciated! Dan
[jQuery] Re: serialScroll option : start -- no effect
Can you provide a demo online ? Cheers -- Ariel Flesler On Apr 10, 6:17 am, Niels niels.siem...@gmail.com wrote: We're using the serialScroll method and using some of the options. Only the option start has no effect. We want to scroll at the start to element 2 and not to the default position 0 Suggestions? $('#technical').serialScroll({ target:'#technical-sections', items:'li', // Selector to the items ( relative to the matched elements, '#sections' in this case ) axis:'x',// The default is 'y' scroll on both ways navigation:'#technical-navigation li a', duration:900,// Length of the animation (if you scroll 2 axes and use queue, then each axis take half this time) force: true, // Force a scroll to the element specified by 'start' (some browsers don't reset on refreshes) constant: false, // constant speed lock:false, // Ignore events if already animating (true by default) //prev:'img.prev',// Selector to the 'prev' button (absolute!, meaning it's relative to the document) //next:'img.next',// Selector to the 'next' button (absolute too) //queue:false,// We scroll on both axes, scroll both at the same time. //event:'click',// On which event to react (click is the default, you probably won't need to specify it) //stop:false,// Each click will stop any previous animations of the target. (false by default) //lock:true, // Ignore events if already animating (true by default) start: 2, // On which element (index) to begin ( 0 is the default, redundant in this case ) //cycle:true,// Cycle endlessly ( constant velocity, true is the default ) //step:1, // How many items to scroll each time ( 1 is the default, no need to specify ) jump:true, // If true, items become clickable (or w/e 'event' is, and when activated, the pane scrolls to them) //lazy:false,// (default) if true, the plugin looks for the items on each event(allows AJAX or JS content, or reordering) //interval:1000, // It's the number of milliseconds to automatically go to the next
[jQuery] Re: Triggering a namespaced event
Can you make a demo out of this ? Please put the unminified version of jQuery 1.3.2. -- Ariel Flesler On Apr 8, 4:12 pm, Paul Thiel pjth...@gmail.com wrote: Hi guys. Using jQuery 1.3.2 and getting some unexpected behavior this morning. This works, with the alert being executed when the showpalette event is triggered. $().bind('showpalette', function() { alert('showing palette!'); }); $.event.trigger('showpalette'); However, this does NOT work: $().bind('show.palette', function() { alert('showing palette!'); }); $.event.trigger('show.palette'); What am I missing? Namespacing your events should be just fine in this scenario, right?
[jQuery] Re: jQuery.event.trigger()
(Reply to either) Can you make a demo out of this ? Please put the unminified version of jQuery 1.3.2. -- Ariel Flesler On Apr 8, 4:52 pm, Paul Thiel pjth...@gmail.com wrote: Hi guys. Trying again as not sure what happened to the previous post. I am using jQuery 1.3.2 and getting some unexpected behavior this morning. This works, with the alert being executed when the showpalette event is triggered. $().bind('showpalette', function() { alert('showing palette!'); }); $.event.trigger('showpalette'); However, this does NOT work: $().bind('show.palette', function() { alert('showing palette!'); }); $.event.trigger('show.palette'); Also, trying to trigger the event with an event object, thus: $.event.trigger({ type : 'showpalette', palette : palette }); ... also does not work with the bound handler seeing 'undefined' as the second parm (after the event object). If I trigger the event like this: $.event.trigger('showpalette', [palette]); ... it is getting though to the handler just fine. What am I missing? Namespacing your events should be just fine in this scenario, right? Is there something about $.event.trigger() that is different to $ ('#elem').trigger()??
[jQuery] Re: slide/scroller to top
The browser scrollbar ? If so: With the ScrollTo plugin [1]: $.scrollTo( 0 ); You can add a duration as second argument (f.e: 1000). [1] http://flesler.blogspot.com/2007/10/jqueryscrollto.html -- Ariel Flesler http://flesler.blogspot.com On Mar 25, 12:41 pm, introvert aljaz.faj...@gmail.com wrote: Hello How is it possible to slide scrollbar to the top with jquery? Thanks a lot for help!
[jQuery] Re: scrollto and jumping
In case James comment doesn't do for you, please provide a demo. -- Ariel Flesler http://flesler.blogspot.com On Mar 24, 11:27 pm, kevinm sonicd...@gmail.com wrote: I have a vertical scrolliing area and inside the first area I have an a link that when clicked calls scrollto to scroll the main vertical area. What is happening is that the link is jumping to the link, then it scrolls. Any thoughts Thanks Kevin
[jQuery] Re: scrollto function works with static html, but not with identical generated html
I don't see that link... neither a call to scrollTo within any of the included js files. Where should I look ? -- Ariel Flesler http://flesler.blogspot.com On Mar 25, 1:47 pm, ryan ryanr...@gmail.com wrote: i forgot to mention that the temporary scroll button i've set up is a h1scroll down test/h1 in the lower right. i apologize if i'm missing something really obvious here, but really don't understand how javascript can operate differently on two html pages that appears to me to be identical. - r On Mar 25, 2:48 am, ryan ryanr...@gmail.com wrote: hi all - i'm just trying to scroll an iframe without a big standard scrollbar, but have run into a confusing problem: i'm able to scrollstatichtml pages loaded in the iframe fine, but for some reason am unable to scroll pages that have been generated by drupal or blogger in firefox. (safari works fine). my test page is athttp://nickzmusic.com/nick.htmlnotethe two nav links at the top to two identical pages (one static one generated). one works and one doesn't. any ideas as to why? thanks in advance everyone, and especially to ariel flesler! peace. -ryan
[jQuery] Re: Tutorial for serialScroll?
Hi Jack The rule of thumb is, if it works without javascript, it'll work w/it. Make the pane scrollable with overflow:visible and the items within it. Once it works, you can switch to overflow:hidden + serialScroll. -- Ariel Flesler http://flesler.blogspot.com On Mar 20, 2:08 pm, Jack Killpatrick j...@ihwy.com wrote: Hi All, I did a nifty implementation using jquery serialScroll to scroll images inside an iphone image (to display screenshots: site isn't publicly available yet). I had to reverse-engineer my way through the demos and other people's implementations to figure out how to make it work. Main problems stemmed from getting the html and css right. Anyway, I'm wondering if anyone knows of some good tutorials for serialScroll? If not, I rekkin I might write one up. Thx, Jack
[jQuery] Re: the hash option in localscroll plugin doesn't work in safari
Can you provide a test case ? A demo that isn't working so I can check. First make sure you don't have js errors in the page :) -- Ariel Flesler http://flesler.blogspot.com On Mar 12, 9:12 pm, mangajin sushisupers...@gmail.com wrote: Hi, I did use localscroll as the plugin in order to scroll to specific part of the page. It work very well in ie7, FF3 and chrome. However not in safari. It will work fine in safari only when you have 'hash' as 'true'. If someone can solve this problem please help me. Thank you
[jQuery] Announce: ScrollTo 1.4.1 and LocalScroll 1.2.7 Released!
Hi all I've released jquery.scrollTo 1.4.1[1] and jquery.localScroll 1.2.7 [2]. Both contain some nice enhancements and a fair amount of small features. Both old and new versions are compatible with jQuery 1.2.x and 1.3.x. jquery.scrollTo 1.4.1 implements synchronic animations by default (1.3 addition). It also now works on quirks mode, I tested on all major browsers, including Chrome, even for iframes. It is also now compatible with xml +xhtml pages (testing is appreciated). jquery.localScroll 1.2.7 improvements are specially focused on the (problematic) 'hash' setting. You can now access and modify the settings object after initialization. [1]http://flesler.blogspot.com/2009/03/jqueryscrollto-141- released.html [2]http://flesler.blogspot.com/2009/03/jquerylocalscroll-127- released.html As always, I appreciate any feedback, testing and feature requests. I'll hopefully have a new release for jquery.serialScroll soon. Cheers -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: location.hash -scrolling to the middle of the page
I avoid using scrollTo because I wanna have #about in the url so that i can refer to specific part of my page. So I didn't use scrollTo plugin but using the mothed posted from here: http://www.zachstronaut.com/posts/2009/01/18/jquery-smooth-scroll-bug... You can keep the hash (#about) in the url and even react to it on page load, automatically. You need to use localScroll[1], which is a wrapper for the aforementioned scrollTo. When the option 'hash' is set to true, it'll update the hash as it'd normally do. [1]http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html Cheers -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: location.hash -scrolling to the middle of the page
I avoid using scrollTo because I wanna have #about in the url so that i can refer to specific part of my page. So I didn't use scrollTo plugin but using the mothed posted from here: http://www.zachstronaut.com/posts/2009/01/18/jquery-smooth-scroll-bug... You can keep the hash (#about) in the url and even react to it on page load, automatically. You need to use localScroll[1], which is a wrapper for the aforementioned scrollTo. When the option 'hash' is set to true, it'll update the hash as it'd normally do. [1]http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html Cheers -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: LocalScroll with anchor in URL not working
Uhm... I really dunno. As I told you, the plugin won't react to clicks on the Back button. I intend to take another look at this asap. Try putting the window.scrollTo line outside the document.ready. On Thu, Mar 5, 2009 at 1:28 PM, clorentzen carl.lorent...@gmail.com wrote: Ariel -- Thanks again for responding. I've tried a few more things, but the links from another page targeting my scrolling page still seem to work unreliably. I'm in FF3 mainly, but can see the issue in Safari 3 and IE6 and 7 as well. Sometimes the links to site two and site three on this page work exactly as intended (scrolling over to the appropriate place), and other times they merely load the page basically at 0,0. http://www.cementresources.com/paneltest/hub.html The problem with links off my hub.html page doesn't occur every time, though... Which has me even more confused, since sometimes it seems to work, but if I immediately go back in the browser and try the link on hub.html again, it might not work the second or third time. And if I refresh the scrolling page once loaded (which has a hash in the URL noting the selected anchor), the same problem occurs: sometimes the page reloads scrolled over to the correct spot, other times it just seems to reset the window to 0.0. Let me know if you have any ideas. Appreciate the help. Thanks. --Carl. On Mar 4, 5:39 pm, Ariel Flesler afles...@gmail.com wrote: It seems to be working well for me, on FF2. Using the back button won't animatedly scroll, the plugin isn't monitoring those changes. On Wed, Mar 4, 2009 at 7:28 PM, clorentzen carl.lorent...@gmail.com wrote: Ariel -- Thanks for your reply. If I go to my test page from one of the full URLs with an anchor, and then refresh the page, I still have the problem -- namely, it resets to the beginning of the page and doesn't properly scroll to the anchor location in the URL. Also, when I click my site two link, the subsequent properly scrolls all the way from the left to the anchor location, but the site three link seems to scroll over only from 100 or so pixels from the anchor location. Any ideas why these things might be happening? Thanks again. I've updated my sample/test page with the new code you provided. http://www.cementresources.com/paneltest/hub.html Best, --Carl. On Mar 4, 5:04 pm, Ariel Flesler afles...@gmail.com wrote: I think that happens because you first need to reset the scroll to (0,0). The browser also scrolls natively. I'm planning to add this within $.localScroll.hash, as well as taking advantage of sync animations, added since 1.3. But for now... :) $(document).ready(function(){ window.scrollTo(0,0); $.localScroll.hash({ axis:'x', duration:1500 }); $('#container').localScroll({ axis:'x', hash:true, duration: 1000 }); }); -- Ariel Fleslerhttp://flesler.blogspot.com On Mar 4, 3:47 pm, clorentzen carl.lorent...@gmail.com wrote: Sorry, I hit post button too quickly there... You can see an example linking to a test page here: http://www.cementresources.com/paneltest/hub.html I've seen the issue in FF3, Safari 3, and in IE 6 and 7. Not sure what I'm doing incorrectly. Any help appreciated. Thank you! On Mar 4, 1:43 pm, clorentzen carl.lorent...@gmail.com wrote: Hi -- I'm using theLocalScrollplugin, and having trouble getting it to work when passing the anchor through as part of the URL. Instead of scrolling to the appropriate anchor id, the window just moves a few pixels and stops. CallingLocalScrollon links within the page works fine, but not when the link is coming from another page or typed directly in the browser address bar. My code for initializingLocalScrollis: $(document).ready(function(){ $.localScroll.hash({ axis:'x', duration:1500 }); $('#container').localScroll({ axis:'x', hash:true, duration: 1000 }); }); -- Ariel Fleslerhttp://flesler.blogspot.com -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: LocalScroll with anchor in URL not working
I think that happens because you first need to reset the scroll to (0,0). The browser also scrolls natively. I'm planning to add this within $.localScroll.hash, as well as taking advantage of sync animations, added since 1.3. But for now... :) $(document).ready(function(){ window.scrollTo(0,0); $.localScroll.hash({ axis:'x', duration:1500 }); $('#container').localScroll({ axis:'x', hash:true, duration: 1000 }); }); -- Ariel Flesler http://flesler.blogspot.com On Mar 4, 3:47 pm, clorentzen carl.lorent...@gmail.com wrote: Sorry, I hit post button too quickly there... You can see an example linking to a test page here: http://www.cementresources.com/paneltest/hub.html I've seen the issue in FF3, Safari 3, and in IE 6 and 7. Not sure what I'm doing incorrectly. Any help appreciated. Thank you! On Mar 4, 1:43 pm, clorentzen carl.lorent...@gmail.com wrote: Hi -- I'm using the LocalScroll plugin, and having trouble getting it to work when passing the anchor through as part of the URL. Instead of scrolling to the appropriate anchor id, the window just moves a few pixels and stops. Calling LocalScroll on links within the page works fine, but not when the link is coming from another page or typed directly in the browser address bar. My code for initializing LocalScroll is: $(document).ready(function(){ $.localScroll.hash({ axis:'x', duration:1500 }); $('#container').localScroll({ axis:'x', hash:true, duration: 1000 }); });
[jQuery] Re: LocalScroll with anchor in URL not working
It seems to be working well for me, on FF2. Using the back button won't animatedly scroll, the plugin isn't monitoring those changes. On Wed, Mar 4, 2009 at 7:28 PM, clorentzen carl.lorent...@gmail.com wrote: Ariel -- Thanks for your reply. If I go to my test page from one of the full URLs with an anchor, and then refresh the page, I still have the problem -- namely, it resets to the beginning of the page and doesn't properly scroll to the anchor location in the URL. Also, when I click my site two link, the subsequent properly scrolls all the way from the left to the anchor location, but the site three link seems to scroll over only from 100 or so pixels from the anchor location. Any ideas why these things might be happening? Thanks again. I've updated my sample/test page with the new code you provided. http://www.cementresources.com/paneltest/hub.html Best, --Carl. On Mar 4, 5:04 pm, Ariel Flesler afles...@gmail.com wrote: I think that happens because you first need to reset the scroll to (0,0). The browser also scrolls natively. I'm planning to add this within $.localScroll.hash, as well as taking advantage of sync animations, added since 1.3. But for now... :) $(document).ready(function(){ window.scrollTo(0,0); $.localScroll.hash({ axis:'x', duration:1500 }); $('#container').localScroll({ axis:'x', hash:true, duration: 1000 }); }); -- Ariel Fleslerhttp://flesler.blogspot.com On Mar 4, 3:47 pm, clorentzen carl.lorent...@gmail.com wrote: Sorry, I hit post button too quickly there... You can see an example linking to a test page here: http://www.cementresources.com/paneltest/hub.html I've seen the issue in FF3, Safari 3, and in IE 6 and 7. Not sure what I'm doing incorrectly. Any help appreciated. Thank you! On Mar 4, 1:43 pm, clorentzen carl.lorent...@gmail.com wrote: Hi -- I'm using the LocalScroll plugin, and having trouble getting it to work when passing the anchor through as part of the URL. Instead of scrolling to the appropriate anchor id, the window just moves a few pixels and stops. Calling LocalScroll on links within the page works fine, but not when the link is coming from another page or typed directly in the browser address bar. My code for initializing LocalScroll is: $(document).ready(function(){ $.localScroll.hash({ axis:'x', duration:1500 }); $('#container').localScroll({ axis:'x', hash:true, duration: 1000 }); }); -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: Get all events registered for an element
jQuery(elem).data('events'); That's an object with random keys where each key contains a function (handler). -- Ariel Flesler http://flesler.blogspot.com On Feb 23, 10:48 am, Sandesh Singh sandesh...@gmail.com wrote: Hi. As I understand, you can have custom events in jquery, like so - jQuery(elem).bind(custom, function(){}); Is there a way to see all the events an element has been registered for? -- ssshttp://sandesh247.googlepages.com Sent from: Pune Mh India.
[jQuery] Re: building a custom speed
You can create custom speeds, but they're just aliases. You can't have functions, just numbers. $.fx.speeds.custom = 450; -- Ariel Flesler http://flesler.blogspot.com On Feb 23, 7:58 pm, comslash.com comsl...@gmail.com wrote: I was wondering if any one could point me in the right direction for creating a custom speed plugin that extends the current speeds. For example right now I use slideUp('slow'); . But I want to use something like slideUp('custom'); . Where custom takes the height of the object and computes the number of ms to return for slideUp. ie slideUp( (($(this).height / 470) * 1000) ); but I would like to write it like ... slideUp('custom'); Thank You
[jQuery] Re: jquery and minify
Yeah, I was just showing you the layout. We (jQuery) implemented the /*! since 1.3 because the YUI compressor is now used and it indeed recognizes /*!. Cheers On Sun, Feb 1, 2009 at 10:25 PM, Sam Sherlock sam.sherl...@gmail.com wrote: Thanks Ariel. I have found out that http://code.google.com/p/minify/ retains comments when that are like /*! */ also I have seen that sometimes jQuery has this style of comment already 2009/1/31 Ariel Flesler afles...@gmail.com You should keep the headers somewhere, preferably close to the code. Something like this: /** * jQuery */ (function($){...}); /** * Plugin 1 */ (function($){...}); /** * Plugin 2 */ (function($){...}); -- Ariel Flesler http://flesler.blogspot.com On Jan 29, 10:53 pm, Sam Sherlock sam.sherl...@gmail.com wrote: Having just seen this sitehttp://www.highpointvillage.co.uk; running it through yslow (it got an f 50/100), one way to improve it would be reducing the http requests - but:- Would combining the scripts on a site like this with minify be contrary to the license of jQuery? could jquery be minifed in a file with the comment header retained at the top of combined file? or would one have to have a jquery.js file minified with comment header intact and combine the plugins? -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: plugins.jquery.com does not have 1.3.x
Ping Mike Hostetler about this. I told him about this and he did indeed added it. Maybe he forgot to add it somewhere else... -- Ariel Flesler http://flesler.blogspot.com On Jan 30, 1:29 pm, Mika Tuupola tuup...@appelsiini.net wrote: When submitting a new plugin or plugin release there is no 1.3.x option in the plugins.jquery.com pulldown. Can someone add it? -- Mika Tuupolahttp://www.appelsiini.net/
[jQuery] Re: jquery and minify
You should keep the headers somewhere, preferably close to the code. Something like this: /** * jQuery */ (function($){...}); /** * Plugin 1 */ (function($){...}); /** * Plugin 2 */ (function($){...}); -- Ariel Flesler http://flesler.blogspot.com On Jan 29, 10:53 pm, Sam Sherlock sam.sherl...@gmail.com wrote: Having just seen this sitehttp://www.highpointvillage.co.uk; running it through yslow (it got an f 50/100), one way to improve it would be reducing the http requests - but:- Would combining the scripts on a site like this with minify be contrary to the license of jQuery? could jquery be minifed in a file with the comment header retained at the top of combined file? or would one have to have a jquery.js file minified with comment header intact and combine the plugins?
[jQuery] Re: how tu use jQuery.getJSON in synchronous mode
It's success not succcess. -- Ariel Flesler http://flesler.blogspot.com On Jan 25, 2:36 pm, Olivier lafanech...@gmail.com wrote: I try to use jQuery.ajax with dataType : 'json' : jQuery.ajax({ url : poll.json, dataType : 'json', cache : false, succcess : function(jsonObj, textStatus){ }, error : function(XMLHttpRequest, textStatus, errorThrown){ . }, async : false }); it seems not running
[jQuery] Re: jQuery onunload
Update to 1.3.x. That part was greatly optimized. -- Ariel Flesler http://flesler.blogspot.com On 20 ינואר, 01:44, Charles Johnson lizard...@gmail.com wrote: My site runs on quite a bit of jQuery-based Javascript, and occasionally I'll receive a complaint from a reader that their browser goes into an infinite loop and throws a script timeout error, when they follow a link that takes them away from the page. I'm assuming this has something to do with jQuery's removal of event handlers when the page is unloaded; i.e. this code in 1.2.6: // Prevent memory leaks in IE // And prevent errors on refresh with events like mouseover in other browsers // Window isn't included so as not to unbind existing unload events jQuery(window).bind(unload, function() { jQuery(*).add(document).unbind(); }); Today someone complained of seeing this script timeout in Firefox 3. Is there something I can do to prevent this? There are a lot of dynamic elements in the site, and event handlers are being installed on the fly, but I also use the unbind() method before replacing any HTML and installing new handlers -- so I'm pretty sure there aren't orphaned bits of event-bound HTML floating around. Any ideas are welcome...
[jQuery] Re: run function when 'each' is done, how?
if( $('span.countdown').length ){ updateCounter(); } -- Ariel Flesler http://flesler.blogspot.com On 23 ינואר, 11:39, johannesf johannes.foss...@gmail.com wrote: Hi jquery is fantastic :-) My problem: I have a simple each-loop and after the loop I want to run a js-function. How can I determine when the each-loop is done in a more elegant way then this! - var flag = false; $('span.countdown').each(function(){ flag = true; }); // when the loop is done, run 'updateCounter()' if(flag == true){ updateCounter(); } all the best / johannes -- View this message in context:http://www.nabble.com/run-function-when-%27each%27-is-done%2C-how--tp... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jquery 1.3 n.queue is not a function?
You really need to provide a demo online else we can't figure out the problem. -- Ariel Flesler http://flesler.blogspot.com On Jan 19, 4:23 pm, yellow1912 yellow1...@gmail.com wrote: Oops, Im sorry but $(selector + ' .step[title='+currentIndex+'] div.stepContent').fadeOut (slow); --jQuery.queue is not a function On Jan 19, 12:22 pm, yellow1912 yellow1...@gmail.com wrote: I think I found out something closer to the root cause: $(selector + ' .step[title='+currentIndex+'] .stepContent').fadeOut (slow); --jQuery.queue is not a function $(selector + ' .step[title='+currentIndex+'].stepContent').fadeOut (slow); -- no error, but obviously not producing the effect I want $(selector + ' .step[title='+currentIndex+'] div.stepContent').fadeOut (slow); -- no error, but obviously not producing the effect I want the html structure is somewhat like this div id=#selector_id div class=step title=1 h4 class=stepTitlesometitle/h4 div class=stepContentcontent goes here/div /div !-- more steps go here-- /div
[jQuery] Re: jQuery 1.3 live() vs listen/intercept plugins
live is very similar to Intercept. It bubbles up using closest(). Listen is faster and specially more scalable, but supports a small subset of selectors. It can also bubble up if you specify so. -- Ariel Flesler http://flesler.blogspot.com On Jan 16, 5:58 pm, rolfsf rol...@gmail.com wrote: I'm trying to understand where the new live() fits in to the world of event delegation, and plugins like listen and intercept What are the arguments for one approach over the other? thanks!
[jQuery] Re: .live help needed
The idea is that you don't need to call live every time, it works persistently. Just call it at start and it should keep on working. -- Ariel Flesler http://flesler.blogspot.com On Jan 16, 6:57 pm, seasoup seas...@gmail.com wrote: I'm playing around with the new .live functionality. it seems very cool. I have a page that gets refreshed with ajax with a .live getting set for a list of links every time, so I need to call .die but .dies doesn't seem to be working... $('a[name=prioritya]').die('click', currFxn); $('a[name=prioritya]').live('click', currFxn); I don't think it matters what currFxn does, but it is a defined function. Any idea why .die isn't working? Secondly, if I call $('a[name=prioritya]').die('click'); does that remove all live 'click' events from the page, or just those registered to a[name=prioritya]? Thanks, Josh Powell
[jQuery] Re: .animate() custom animation callback?
You have to click on Options. On Thu, Jan 15, 2009 at 8:30 PM, Ricardo Tomasi ricardob...@gmail.com wrote: http://docs.jquery.com/Effects/animate#paramsdurationeasingcallback http://docs.jquery.com/Effects/animate#paramsoptions This is what the links on the main page point to. Where did you get that link? I thought those were innocent hashes :D On Jan 15, 6:45 pm, Ariel Flesler afles...@gmail.com wrote: How come it isn't on the docs ? http://docs.jquery.com/Effects/animate#toptions On Thu, Jan 15, 2009 at 6:43 PM, Ricardo Tomasi ricardob...@gmail.com wrote: It's not in the docs, but you have to pass the callback as the 'complete' option: $(this).animate({marginTop:'500px'}, {queue: false, complete: function (){ ... } }); On Jan 14, 4:10 pm, lhwpa...@googlemail.com lhwpa...@googlemail.com wrote: hi, im using .animate() to create a custom animation. is there any way to handle a callback function? normal . animation() has a parameter for a callback function but not the one for own animations? -- Ariel Fleslerhttp://flesler.blogspot.com -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: propagation in 1.3
The propagation was only added to fake events, that is, those generated by calling $(...).trigger(); Real events were already bubbling (propagating) natively. We only normalized event bubbling for all events, by adding it to our fake events. You can always stop the propagation by calling event.stopPropagation (), returning false or using triggerHandler. -- Ariel Flesler http://flesler.blogspot.com On Jan 15, 10:02 am, Javier Martinez ecentin...@gmail.com wrote: First of all, thanks to all jQuery members for the new release! is a great gift! With this release, one of the main features is the new event propagation logic. As I can understand, it seems that, for example, if I have a div(inside) inside other div(outside) and I attach a click event to the inside div. The outside div will trigger it's events too... and it's parent, parent of the parent, etc until it reach the body element. Is this ok? If this is the logic, then maybe there is a little overhead on the browser for a simple event attachment on the most inner div if there is no need for this propagation (to work like 1.2.6 I mean)... or not? Thanks to all!
[jQuery] Re: .animate() custom animation callback?
How come it isn't on the docs ? http://docs.jquery.com/Effects/animate#toptions On Thu, Jan 15, 2009 at 6:43 PM, Ricardo Tomasi ricardob...@gmail.com wrote: It's not in the docs, but you have to pass the callback as the 'complete' option: $(this).animate({marginTop:'500px'}, {queue: false, complete: function (){ ... } }); On Jan 14, 4:10 pm, lhwpa...@googlemail.com lhwpa...@googlemail.com wrote: hi, im using .animate() to create a custom animation. is there any way to handle a callback function? normal . animation() has a parameter for a callback function but not the one for own animations? -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: How can I add a TRUE custom event or modify existing jQuery functions?
I just made a plugin to do EXACTLY what you're asking for. It's not formally released yet so there's no documentation. If you want, you can use it. http://test.flesler.com/jquery.broadcast/ Note that it requires jQuery 1.3. That means you need to use the version on trunk or any of the recently released betas. Cheers -- Ariel Flesler http://flesler.blogspot.com On Jan 9, 5:30 pm, kape erlend.so...@gmail.com wrote: I have created custom styled buttons in my page and would like to toggle their class and therefore their look when they get disabled or enabled. So is there any way to call a function when .removeAttr ('disabled'), .attr('disabled', ''), and .attr('disabled', 'disabled') are invoked? Basically, is there any way to have enable/disable act like an event such as click, mouseover, etc.? I've tried overwriting the jQuery function as follows: jQuery.fn.removeAttr = function(name) { if(this.eq(0).hasClass('buttonDisabled') name == 'disabled') this.eq(0).removeClass('buttonDisabled'); jQuery.attr(this.get(0), name, ); if (this.get(0).nodeType == 1) this.get(0).removeAttribute(name); }; and when $('.buttonDisabled').removeAttr('disabled') is called, the disabled attribute and buttonDisabled class are removed. This is what I want, but it doesn't seem right. I shouldn't be overwriting the removeAttr function. Also, I'd have to do the same thing for jQuery's attr() function to add the buttonDisabled class when .attr('disabled', 'disabled') is called. Can I add the code I need to the functions and then call super somehow? Is there a simpler way to achieve what I want?
[jQuery] Re: How can I add a TRUE custom event or modify existing jQuery functions?
Nice, let me know how it goes. On Sun, Jan 11, 2009 at 2:05 PM, kape erlend.so...@gmail.com wrote: Thanks, I'll actually give that a try. On Jan 11, 9:46 am, Ariel Flesler afles...@gmail.com wrote: I just made a plugin to do EXACTLY what you're asking for. It's not formally released yet so there's no documentation. If you want, you can use it. http://test.flesler.com/jquery.broadcast/ Note that it requires jQuery 1.3. That means you need to use the version on trunk or any of the recently released betas. Cheers -- Ariel Fleslerhttp://flesler.blogspot.com On Jan 9, 5:30 pm, kape erlend.so...@gmail.com wrote: I have created custom styled buttons in my page and would like to toggle their class and therefore their look when they get disabled or enabled. So is there any way to call a function when .removeAttr ('disabled'), .attr('disabled', ''), and .attr('disabled', 'disabled') are invoked? Basically, is there any way to have enable/disable act like an event such as click, mouseover, etc.? I've tried overwriting the jQuery function as follows: jQuery.fn.removeAttr = function(name) { if(this.eq(0).hasClass('buttonDisabled') name == 'disabled') this.eq(0).removeClass('buttonDisabled'); jQuery.attr(this.get(0), name, ); if (this.get(0).nodeType == 1) this.get(0).removeAttribute(name); }; and when $('.buttonDisabled').removeAttr('disabled') is called, the disabled attribute and buttonDisabled class are removed. This is what I want, but it doesn't seem right. I shouldn't be overwriting the removeAttr function. Also, I'd have to do the same thing for jQuery's attr() function to add the buttonDisabled class when .attr('disabled', 'disabled') is called. Can I add the code I need to the functions and then call super somehow? Is there a simpler way to achieve what I want? -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: IE8.
I noticed, yesterday, that on IE8, scrollTo doesn't work on overflowed elements. http://demos.flesler.com/jquery/scrollTo/ I even tried $('#elem').attr({ scrollLeft:500, scrollTop:500 }) but that didn't work as well. -- Ariel Flesler http://flesler.blogspot.com On Dec 18 2008, 1:50 pm, sferragne simonferra...@gmail.com wrote: Our friends at Microsoft have a lot of work to do until their new born browser IE8 (Still in Beta 2) actually works the way it should. It seems that there is a major event triggering issue. Lots of jQuery core functionalities depends of events. For the ones interested to see some upcoming bugs, download IE8 beta 2 and visit the following links. Jquery Corner. (Not working)http://www.malsup.com/jquery/corner/
[jQuery] Re: Custom Events on Non-DOM Objects
Using non-dom elements should work just fine. You'd rather not use the document as that could lead to unexpected memory leaks. -- Ariel Flesler http://flesler.blogspot.com On Jan 6, 1:56 pm, Marcus Cavanaugh marcuscavana...@gmail.com wrote: I noted that firing custom events seems to work on any object, for instance: var myObject = {}; $(myObject).bind(...) $(myObject).triggerHandler(...) Simon Willison had written a tutorial that mentioned using document instead for that purpose, and I seem to recall yet another mention of using $(*) or something like that. What is the recommended best practice for custom events? Is it okay to bind them to non-DOM javascript objects (and are there any downsides to doing so)?
[jQuery] Re: Test if a variable is a jQuery object?
There're different ways: obj instanceof jQuery obj obj.constructor == jQuery obj obj.jquery And any other possible attribute sniffing, 'jquery' is obviously the safest. -- Ariel Flesler http://flesler.blogspot.com On Jan 5, 7:08 pm, Eric Garside gars...@gmail.com wrote: This sort of thing can happen a lot if you're writing functions which take multiple inputs, based on convenience. Being in control of your code shouldn't be a fascist thing like you're describing, where there's only one way in which everything can or should happen. Having openness in parameters is always a good thing. And with that, you'll want to use instanceof to solve the problem. var someObj = document.getElementById('div1'), otherObj = $('div id=div2/div'), thirdObj = {}; if (someObj instanceof jQuery); // false if (otherObj instanceof jQuery); // true if (thirdObj instanceof jQuery); // false Whereas all options return object in a typeof check, instanceof allows you to compare an object with an instantiation object, like jQuery. On Jan 5, 3:57 pm, MorningZ morni...@gmail.com wrote: I'm trying to grasp the concept of need for this check What's a situation where you would wonder what it is? Are you not in control of your own code or something? On Jan 5, 3:53 pm, Andy Matthews amatth...@dealerskins.com wrote: How can I test to see if something is a jQuery object, or a normal JavaScript object? andy
[jQuery] Re: Time since last event?
The event object received by all event handlers has a timeStamp property which contains the (again) timestamp in milliseconds. You can keep that value to know how much time passed since last event. You can also create your own timestamp by calling new Date().getTime (). -- Ariel Flesler http://flesler.blogspot.com On Jan 4, 10:45 am, Mads mads...@gmail.com wrote: I'm working on spicing up a search bar so it loads the results through an ajax call. I throws the request whenever a keyup event has been fired in the input field, my code looks like this: inputValue = jQuery(input#s).val(); url = http://www.iconpark.net/?s=; + inputValue + #content *; jQuery(#content).slideUp(800, function() { jQuery(#content).load(url,{},function() { jQuery(#content).slideDown(500, function() { jQuery('p:contains('+inputValue+')').each(function(){ jQuery(this).html(jQuery(this).html().replace(new RegExp (inputValue,'g'), 'span class=highlighted'+inputValue+'/span')); }); }); jQuery.getScript(http://www.iconpark.net/wp-content/themes/ PixelResort/javascript/myScripts.js); }); }); I works fine, it wraps the search results with span class=highlighted/span, however, at the moment it creaets as many span tags as key-up events so I'm wondering if there is a to calculate the time that has elapsed since last key-up event so I could call the jQuery code that hightlights the search results only when a second has passed since last kep-up event?
[jQuery] Re: event.preventDefault() not in the intellisense?
I haven't used Visual Studio in a while, and never for js... But... how would it know it is an event object ? It's just an argument of a function that could be anything... -- Ariel Flesler http://flesler.blogspot.com On Jan 4, 1:54 am, yww yww...@gmail.com wrote: Hi I am new to this group and also new to Jquery. So I am just trying the sample in tutorials. Basically it works very nicely. But there is a small flaw while I was playing with JQuery, that I can't get the intellisnse help from visual studio. and I have captured the screen shot as following: http://picasaweb.google.com/lh/photo/i6GxK88a7vxrQR9qS8BARQ?feat=dire... so you see I have add reference to jquery-1.2.6-vsdoc.js, but there is no preventDefault() method for event object. What should I do to enable that? by the way, although the method was not listed, it can be used correctly and really prevented the click event.
[jQuery] Re: Adding scope support to .bind()
Note that isFunction is much faster now. It has been improved 3 times between 1.2.6 and 1.3b. On Thu, Dec 25, 2008 at 4:06 PM, Eduardo Lundgren eduardolundg...@gmail.com wrote: Hi Balazs, Thanks for give us your opinion. When you use $.isFunction(data) on the bind method it is very expensive when you have a lot of iterations. Diff the file I attached with the original file (rev. 5996) I made only a small change on the bind() method, and it's compatible with data and with out API. On Thu, Dec 25, 2008 at 3:05 AM, Balazs Endresz balazs.endr...@gmail.comwrote: Hi, I think this would be really useful! I've also modified jQuery to do this a while ago (1.2.6) but with the new scope being the last argument, so it works without the data object as well: jQuery.fn.bind=function( type, data, fn, bind ) { return type == unload ? this.one(type, data, fn) : this.each (function(){ if( $.isFunction(data) ) jQuery.event.add( this, type, data, bind, fn ); else jQuery.event.add( this, type, fn, data, bind ); }); } jQuery.event = { add: function(elem, types, handler, data, bind) { if ( elem.nodeType == 3 || elem.nodeType == 8 ) return; if( bind != undefined ) handler = jQuery.bind(handler, bind); //change scope ... jQuery.each( (blur,focus,load,resize,scroll,unload,click,dblclick, + mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave, + change,select,submit,keydown,keypress,keyup,error).split(,), function(i, name){ // Handle event binding jQuery.fn[name] = function(fn, bind){ //second argument for the scope return fn ? this.bind(name, fn, bind) : this.trigger(name); }; }); where jQuery.bind is: jQuery.bind=function( fn, bind ){ var args = $.makeArray( arguments ).slice(2); if( args.length == 1 $.isArray( args[0] ) ) args = args[0]; return function(){ return fn.apply( bind, args ); } } On Dec 25, 10:38 am, Eduardo Lundgren eduardolundg...@gmail.com wrote: Hi guys, The .bind() method consider the scope of the handler the element whose the event is assigned - that is the correct as default. I've been playing with the event.js and implemented an alternative to call .bind(), specifying another scope, that looks useful for our api. I've attached the event.js modified from the rev. 5996 from the trunk. The changes are compatible with the current API. Here goes one example: var scopeTest = function() { this.name = iamanotherscope; this.internalHandler = function(event) { console.log(I am another scope method., this.name , event, event.data); }; }; var scope = new scopeTest(); $('div').bind('click', {data: true}, globalHandler); $('div').bind('click', {data: true}, scope.internalHandler); // handler, data, default scope $('div').bind('click', {data: true}, scope, scope.internalHandler); // handler, data, pre-defined scope Let me know if make sense for you. -- Eduardo Lundgren Software Engineer Liferay, Inc. Enterprise. Open Source. For Life. event.js 26KViewDownload -- Eduardo Lundgren Software Engineer Liferay, Inc. Enterprise. Open Source. For Life. -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: Serial Scroll, animated images look jagged
I suppose the browser can't redraw properly. You can try tuning up the settings (duration,easing). Also.. maybe changing the styling a bit. It's not a serialScroll issue per se.. the plugin simply animates the scrollLeft property using jQuery. So that should happen even if you use plain jQuery code. Cheers -- Ariel Flesler http://flesler.blogspot.com/ On Dec 23, 2:44 pm, jen timeyout...@gmail.com wrote: Bump. I've tried researching this, and the only thing I found is an old issue about left to right being switched to right to left and therefore something in parallel needs to scale then scroll... but I can't find anything in the code that does this. Does anyone have any ideas on why the images in this slider fragment when they move? Thanks in advance! On Dec 22, 12:23 pm, jen timeyout...@gmail.com wrote: Bump. Does anyone have any ideas why the images seem to fragment? On Dec 19, 3:24 pm, jen timeyout...@gmail.com wrote: http://www.louriecutler.com.ws019.alentus.com/people/slider.php What am I doing wrong, that the images slide across looking so jagged? Thanks!
[jQuery] Re: javascript namespacer
No eval() please! function namespace(name, data){ data = data || window; name = name.split(.); for (var i=0; i name.length; i++) { var ns = name[i]; data = data[ns] || ( data[ns] = {} ); } return data; }; It'd a little get shorter if you use jQuery.each. Cheers -- Ariel Flesler http://flesler.blogspot.com/ On Dec 17, 8:05 pm, Kean shenan...@gmail.com wrote: I wrote a simple namespacer. Do you think this is useful in real world applications? Any improvements that can be made to the code? Thank you. var namespace = function (name, global){ var root = global || '$'; (!eval('window.'+root))? eval('window.' + root + '={}') : ''; var name = name.split(.); var fullname; for (var i=0; iname.length; i++) { fullname = (!i) ? name[i] : fullname + . + name[i]; if (!eval (root + . + fullname)) eval (root + . + fullname + = {}); } } namespace('hello.yahoo'); namespace('helloz.yahoo2'); namespace('helloz.yahoo2', 'YAHOO'); $.hello.yahoo.init = function() { alert(1); }; $.helloz.yahoo2.init = function() { alert(2); }; YAHOO.helloz.yahoo2.init = function() {alert(3); }; $.hello.yahoo.init(); //alerts 1 $.helloz.yahoo2.init(); // alerts 2 YAHOO.helloz.yahoo2.init(); // alerts 3
[jQuery] Re: jQuery.data() identifier not working
That's done to avoid memory leaks cleaning up properly. It's not a bug, that's the expected behavior. Cheers -- Ariel Flesler http://flesler.blogspot.com/ On Dec 16, 7:35 pm, ricardoe ricar...@gmail.com wrote: Hi Ricardo Yeah, its a DOM element to be more specific I'm working with a lot of IMG elements. I need to identify them uniquely, (because sometimes the image is repeated, but I need to manage them as different objects), so when I read the documentation for jQuery.data() I (maybe mis-)understand that it will create a Unique id for an element, and its sort of true BUT don't you dare to use removeData() for that element because if you remove all the data attached with jQuery(elem).data('key','value') you will get rid of the unique-id for the element too. Does that make sense? On 16 dic, 10:33, Ricardo Tomasi ricardob...@gmail.com wrote: You can keep your own unique identifier anywhere you want, for data() the identifier is the element itself. If you care to explain a bit more of what you're trying to achieve someone might come up with an useful suggestion. What did 'elem' refer to in your original script for example? A DOM element? - ricardo On Dec 16, 6:46 am, ricardoe ricar...@gmail.com wrote: Well, solved issue: Don't trust jQuery.data(element) if you're pretending to use gQuery (element).data('only-data-element','something') When you use gQuery(element).removeData('only-data-element') the jQuery.cache for that element will be deleted. This leads that when you do again jQuery.data(element) you WONT have the expected ID, it will create a new one. Why?! I dunno. But I'll not file a ticket cause most of people doesn't use it that way.. lame. On Dec 16, 1:39 am, ricardoe ricar...@gmail.com wrote: Hi, Does anyone knows why this: var id = elem[ expando ]; // Compute a unique ID for the element if ( !id ) { id = elem[expando] = ++uuid; } Could be being broken? I mean, on a test page I made the elem[expando] property is not being saved. I'll explain, the first time I do jQuery.data(element) I get a number lets say: 10. Then if I do again the same (with the exactly same element) I get: 14. I'm using this to identify elements so its not working as expected, anyone have theories about this?
[jQuery] Re: serialScroll and jCarousel lite
serialScroll can be used with constant scrolling. As in, item-based. Not sure what you mean. Cheers -- Ariel Flesler http://flesler.blogspot.com/ On Dec 16, 11:24 pm, IsRaz88 isra...@gmail.com wrote: Does anyone have any idea? -IsRaz88 On Dec 15, 5:51 pm, IsRaz88 isra...@gmail.com wrote: Hey, I was wondering if anyone knows how I could implement serialScroll with jCarousel lite to get a constant scrolling function instead of scroll then pause. Any help is appreciated. Thanks. -IsRaz88
[jQuery] Re: Problem on jquery 1.2.6 with ie6
You're probably passing an easing equation (name) that is not registered. You either find it and remove it, or add the plugin: http://gsgd.co.uk/sandbox/jquery/easing/ Cheers -- Ariel Flesler http://flesler.blogspot.com/ On Dec 16, 1:33 pm, m.ugues m.ug...@gmail.com wrote: For more detail see this post http://codylindley.com/thickboxforum/comments.php?DiscussionID=1435p... Kind regards. Max On Dec 16, 11:23 am, m.ugues m.ug...@gmail.com wrote: Hallo all. I'm using domWindow with jQuery 1.2.6.min and I have a big problem on core library. When I open a domWindow on Firefox i receive this error, but the domWindow works anyway. Error: jQuery.easing[this.options.easing || (jQuery.easing.swing ? swing : linear)] is not a function Source File: file:///D:/Mazi/Develop/workspace-aptana/Examples/domWindow/js/jquery-1.2.6.min.js Line: 32 On IE6 the problem broke up and domWindow does not appear. Any idea? Kind regards Max
[jQuery] Re: serialScroll Plugin - Problems with lazy loading of items (dynamically updating item list)
The demo is not too functional. Elements don't scroll (at least in FF). Elements here do rearrange when adding/removing. The option lazy should do. Could you fix w/e needs to be fixed so that the problem does arise ? Note that you don't need line #34 of the pastie. That could actually mess it all up once it works. Cheers -- Ariel Flesler http://flesler.blogspot.com/ On Dec 12, 3:19 am, vanstee patrickvans...@gmail.com wrote: Please take a look at my code.http://pastie.org/337379or if you want to look at a functioning copy go tohttp://vansteedesign.com/flashcards/test.php. Even when setting the 'lazy' attribute to true in the parameters, when you delete one of the cards (items) from the list it still exists as empty space in the list. To view what I am explaining go to the webpage and click the x on one of the cards. Then cycle through the list. When scrolling to the item after the one we deleted there will be an intermediate scroll to a blank area between the two cards. This is the first time I've used this plugin so it may be a simple problem with how I've set it up. Any guidance would be greatly apprecated. Thanks in advance.
[jQuery] Re: Iterating through .data() elements...
You mean this: http://dev.jquery.com/ticket/3539 You're right indeed, I forgot queue was blindly executing any queued data. I was sure it'd only do that for fx queues. I was confusing it with my patch. So yes, queuing is only good for functions for now, we'll hopefully have a nicer queuing system for 1.3. Shame it's not documented by the way. As for your situation... I don't think you can retrieve the data object using $.fn.data, but this should do: var $elem = $(); ... $elem.data('foo','bar'); $elem.data('foo2','bar2'); ... var id = $elem.data(); var obj = $.cache[id]; obj should be: { foo:'bar', foo2:'bar2' }; Haven't tested this though, sorry :) Note that this object might include other things if you (for example) bind events to this element. Cheers On Fri, Dec 12, 2008 at 1:28 AM, Nick nschub...@gmail.com wrote: Also, I should mention (as I see a patch request for exposing queue) that I am working on a fairly large framework and patching in an update for one module of the site is not an easy task nor something I want to approach someone with at this time. We are using a more recent version of JQuery, but not the latest. On Dec 11, 10:23 pm, Nick nschub...@gmail.com wrote: queue as in effect queue? I'm not finding any documentation on queue except as used for effects and your sample seems to put items in a queue as if I had to execute things in order. That's not what I'm looking for. I need to store key/value pairs to specific elements on the page for nav requests and data() does this perfectly... I currently store they keywords I need in the data element for each list item and pass the list item contents to the navigation functions. If I can pass a dynamic set of key/value pairs and iterate through the data object to get those values instead of having to know the key, then I can fully utilize the framework I'm working with (suppression flags, navigation keywords, url variables, etc.) I'd hate to have to create a new associative object and pass it when I can append the appropriate data to the element when the page is built and just pass a reference to the element. On Dec 11, 7:28 pm, Ariel Flesler afles...@gmail.com wrote: You need to use $().queue() not data. $().queue('foo',1).queue('foo',2).queue('foo',3) Also, $().queue('foo').each() won't work because the returned data is an array. $.each($().queue('foo'), function(){ }); will work. -- Ariel Fleslerhttp://flesler.blogspot.com/ On Dec 11, 7:42 pm, Nick nschub...@gmail.com wrote: Does anyone know how I can iterate through the elements stored in the data element instead of referring to them individually? Say I: $(someObj).data('myData1', 'Here is some text') .data('myData2', 'Here is some more text') .data('myG', 'Here is some more text'); How could I loop through the data() object to get the key/value pairs back if I didn't know the keys? I tried: $(someObj).data().each(function(i, val) { alert(i + ': ' + val); }); with no success. I also tried variations of for loops and such. -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: Has jQuery development halted?
I'd simply check the trac to see if development halted, instead of asking it publicly in such a challenging way. http://dev.jquery.com/report/28 I've been working pretty hard all this time, closing millions of tickets (sadly most of them invalid). And while I do understand your request, I don't think you used the right place and words to ask it. Needless to say, I'm considerably offended by your post, I think it reduces the hard work to nothing. IMO, it'd had been appropriate to post this to the jquery-dev group, or even ask a core member by email. Finally, if you're really into improving jQuery, this is how: http://dev.jquery.com/newticket -- Ariel Flesler http://flesler.blogspot.com/ On Nov 26, 12:53 pm, Bob den Otter [EMAIL PROTECTED] wrote: Hi all, There hasn't been a jQuery update in what seems like ages, and jQuery UI 1.6 will be released 'in the next few days' since somewhere in september. I know John has been really busy with a lot of great things, but it seems to me like the development of jquery has seriously lagged the last few months. As a small example: there isn't even a way to detect chrome in the official jquery builds yet, and chrome has been out for several months now. I'm afraid that the lack of updates will eventually have a negative impact on the great Query community, causing people to leave for other js frameworks. I sincerely hope not, but i _am_ worried about it. Best, Bob.
[jQuery] Re: table striping performance with livequery
Hahaha! that site is great. How come I've never seen that before :D On Wed, Nov 26, 2008 at 10:22 AM, Karl Swedberg [EMAIL PROTECTED] wrote: http://www.letmegooglethatforyou.com/?q=How+do+I+unsubscribe+from+a+group%3F --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 26, 2008, at 3:45 AM, Lance White wrote: unsubscribe On 25/11/08 9:39 PM, Carpii [EMAIL PROTECTED] wrote: Thanks Brandon, that looks very interesting. Ive read a lot about event handling in jQuery and there seems to be a lot of different plugins, so it was hard to decide which one is best suited. Is there a time when livequery is more suitable than listen? Or even a time when I might want to use both plugins simultaneously? Thanks -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: $.fn.is can't support complex Event Delegation
jQuery.Intercept does support complex selectors. http://plugins.jquery.com/project/Intercept -- Ariel Flesler http://flesler.blogspot.com On Nov 26, 5:03 am, sliu [EMAIL PROTECTED] wrote: Event Delegation are showing its advantage,especially in large webapp. what's event delegation:http://icant.co.uk/sandbox/eventdelegation/ jquery has several plugin to support it, check the one:http://dev.jquery.com/browser/trunk/plugins/delegate/jquery.delegate it use $.fn.is to check whether the event.target match the selector. but $.fn.is is too weak to support:http://docs.jquery.com/Traversing/is quote: If no element fits, or the expression is not valid, then the response will be 'false'. Note: Only simple expressions are supported. Complex expressions, such as those containing hierarchy selectors (such as +, ~, and ) will always return 'true'. filter is used internally, therefore all rules that apply there apply here, as well. for example: body ul lia id=it/a/li /ul /body $('#it').is('.non_exsisting_class a') will return true, unexpectly. I heard: jQuery is about to add event delegation feature in the next release. question 1: is that true? I personally think event delegation is a big thing, to break limitations, and lead UI programming more component-based style and declaritive-style. reglib is a very good javascript library to support event delegation. its author call jQuery(prototype...) as load-traverse-modify style. I suffered with that style, so I admit. reglib event give some solution to treat load-traverse-modify style. I looked into reglib's source code, some duplicates with jQuery. question 2: Is it possible to merge two projects together? reglib:http://code.google.com/p/reglib/http://code.google.com/p/reglib/w/list actually, I'd like step further, how about write code like this: // define a component type named 'sidebar', which contains h2 and ul var sidebar = reg.defineComponent('sidebar', function(sidebar){ sidebar.init(function(){ //load tranversal and modify?? }); var h2 = sidebar.with(' h2'); var ul = sidebar.with('ul'); var li = ul.with('li'); sidebar.data(function(topData){ h2.data(topData.title); ul.data(topData.items); li.data(function(topData){ this.parent.data()[this.index] }); }); h2.click(function(){ alert(this.data()); //topData.title }); li.hover( function(){ this.addClass('hover');}, function(){ this.removeClass('hover'); } ); } // DOM(id=sidebar) will become a sidebar component, and framework will bind the data to it and sub-components. reg.match('#sidebar').to('sidebar', {:title = '...', :items = [...]}); UI-data binding is another anoying problem.
[jQuery] Re: $.fn.is can't support complex Event Delegation
$(selector).index(target) != -1 may cause performance issue? reglib recursively check event.target and its ancestor to know whether it matches selector. It depends on the selector. I'm pretty sure it depends on many factors. If you (f.e) click an element that is deeply nested in the dom, then recursing its ancestors will surely take a long time (proportionally of course). A simple selector is something relatively fast to process and just ONCE, not once for EACH ancestor. If you add to that, that Sizzle will have a cache when available... well.. even faster. I'm not saying this way is surely faster, just that the other approach is not straightly better, always. -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: table striping performance with livequery
LiveQuery supports the whole set of selectors, while Listen doesn't. There's also Intercept, which is sort of in the middle. It uses event delegation, and supports any selector. But it also has more overhead than Listen. IMO, If you can solve your situation with Listen, than go ahead. But if you need more selectors, or you simply don't want to deal with some event delegation problems, then go for LiveQuery. -- Ariel Flesler http://flesler.blogspot.com On Nov 25, 8:39 am, Carpii [EMAIL PROTECTED] wrote: Thanks Brandon, that looks very interesting. Ive read a lot about event handling in jQuery and there seems to be a lot of different plugins, so it was hard to decide which one is best suited. Is there a time when livequery is more suitable than listen? Or even a time when I might want to use both plugins simultaneously? Thanks
[jQuery] Re: xhr.responseText isn't showing up when expected
It's async, not asynch. -- Ariel Flesler http://flesler.blogspot.com On 23 nov, 12:40, howardk [EMAIL PROTECTED] wrote: Am I misunderstanding how $.ajax( { ..., asynch: false } is supposed to work? I'm not seeing a responseText value immediately on returning from the ajax call as I would expect. Here's the relevant code: -- var xhr = $.ajax( { url:' getFontInfo.php', data: 'font=' + fontFileName, asynch: false } ); var fontName = xhr.responseText; -- fontName is empty when I break in Firebug just after the last line above. If I break further down in the code, fontName gets filled out to its expected value. This seems to be an Ajax-complete issue, but I had thought setting asynch false would ensure I'd block on the Ajax call until responseText showed up. Is that a incorrect assumption? Howard
[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?
That's what jQuery.Bubble is for http://plugins.jquery.com/project/Bubble Cheers -- Ariel Flesler http://flesler.blogspot.com On 22 nov, 23:46, Jeffrey Kretz [EMAIL PROTECTED] wrote: Do you know if this plays friendly with the jQuery event model? Looking through the source code, it has its own implementation of fix for events, along with its own data storage for event handlers. Without testing it, I would tend to think these two libraries wouldn't jam up and cause a mess. You implement a jquery-based solution using a pattern like this: jQuery.fn.bubble = function(type) { return this.each(function(i){ // Build a fake event, and assign the target==this. var evt = ; evt.target = this; var el = this; while (el) { // Look for a handler of the supplied type. var handler = ; if (handler) { handler.apply(parent,[evt]); break; } else el = el.parentNode; } }); }; -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ricardobeat Sent: Saturday, November 22, 2008 4:44 PM To: jQuery (English) Subject: [jQuery] Re: event delegation - great, but how does one trigger the handlers through code? You're right, it doesn't work. Maybe NW Events could help here:http://code.google.com/p/nwevents/ It's an event manager and it can fire/propagate 'fake' events. - ricardo On Nov 22, 7:32 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote: I pretty sure it won't, because click() will fire trigger(), which will use data() to lookup the bound event of the selected element, and not find anything. Haven't tested this though. JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ricardobeat Sent: Saturday, November 22, 2008 7:43 AM To: jQuery (English) Subject: [jQuery] Re: event delegation - great, but how does one trigger the handlers through code? Can't you just $('tbody td:eq(x)').click() ? The event should propagate as normal and reach the tbody. I guess. On Nov 22, 1:11 am, Leeoniya [EMAIL PROTECTED] wrote: During event delegation, handlers are registered higher in the DOM tree and then filtered when the event is triggered. This is great if you have 2000 td/th cells, you can attach a listener to tbody and filter down. But would i trigger the event programatically? Since the handler isnt actually registered on the td cells, i cant figure out a way to do this except maybe construct a fake event with the source element by hand and pass it into the handler somehow?? this is the biggest drawback to delegation that i have run into, it would be great to find a good way to manually trigger these events - if anyone has some advice, please share. thanks, Leon
[jQuery] Re: jCarousel, localScroll, other options?
You don't need to include both easing scripts. As for the nice animation... maybe you were using another easing eq ? They all use jQuery's fx module so they're not likely to work differently. Maybe it's the flash embed, I don't know. Check this: http://demos.flesler.com/jquery/scrollTo/ It's the plugin that does the animations. Try clicking the TOC, you'll see the easing working well in it. On Sun, Nov 9, 2008 at 8:46 PM, genius switch [EMAIL PROTECTED] wrote: I did see this, cycle is really nice, but is it more relevant to images and not really for content? Also, i didn't dig into it deeply yet mostly i just bookmarked it for future use... but if it's limited to markup having to be in a list, then that would be what steered me away from jCarousel. Otherwise cycle is really nice and i'll be using it in the future for images. ... and i'd hate to scrap work or start over a third time. I'm hoping i can get the easing to work perfectly here. - C On Nov 9, 12:30 pm, Pixelstuff [EMAIL PROTECTED] wrote: Not to scrap any work you've already done, but the Cycle plugin might work also.http://malsup.com/jquery/cycle/ And there are tons of demo pages of what it can do. It's a very extensive plugin. On Nov 8, 12:27 pm, Ariel Flesler [EMAIL PROTECTED] wrote: Check LocalScroll's docs. That issue when setting the hash is the expected behavior. It's not recommended to combine the option hash when scrolling something else than the window, or scrolling just in 1 direction. There's nothing to do about that I think, it's one or the other. On Sat, Nov 8, 2008 at 12:40 PM, genius switch [EMAIL PROTECTED] wrote: Ok, I was able to debug both items. 1) The flash piece itself is the problem, not swfobject. Keep in mind, what you see here is very ugly right now since we're just starting dev, the clunky ugly flash piece is causing the problem here, and 2) the page jump only happens because the page itself is so tall. If I take away the whole bottom content and the page no longer creates a scrollbar in the browser window, the problem is fixed. That said, I'm not quite sure how i'll fix the second issue. I haven't had enough coffee yet... perhaps some absolute positioning of the top elements, and some top padding of the sections. Hmm... what do you think? - C On Nov 8, 12:25 am, genius switch [EMAIL PROTECTED] wrote: I'm almost there, i don't understand why it anchors the page to that section though (if you notice it moves the whole page up some). Also, a strange little bug in the easing scripting. I'm not sure if i'd call it a bug, but a conflict. I am using swfobject to put the flash on the page and it makes the easing effect not work. If I remove swfobject it works fine. http://www.geniusswitchstudio.com/v2/template.htm by the way thanks for all your awesome help! - C On Nov 7, 10:33 pm, Ariel Flesler [EMAIL PROTECTED] wrote: Also... whatever you put inside the $( ) should be one or more elements containing the links. Just in case, try: $(function() { $.localScroll({ easing:'easeOutQuart' }); }); On Fri, Nov 7, 2008 at 9:29 PM, genius switch [EMAIL PROTECTED] wrote: I'm doing something wrong of course... man why do I stink at javascript? script type='text/javascript' src='includes/scripts/ jquery-1.2.6.min.js'/script script type='text/javascript' src='includes/scripts/jquery.easing. 1.3.js'/script script type='text/javascript' src='includes/scripts/jquery.scrollTo- min.js'/script script type='text/javascript' src='includes/scripts/ jquery.localscroll-min.js'/script script type='text/javascript' src='includes/scripts/init.js'/ script script type=text/javascript $(function() { $(#content).localScroll({ easing:'easeOutQuart', } }); }); /script On Nov 6, 1:29 pm, Ariel Flesler [EMAIL PROTECTED] wrote: You include the easing plugin after jQuery, then when you call LocalScroll: $(...).localScroll( easing:'easeOutQuart', }); You can chose any equation, by name. On Thu, Nov 6, 2008 at 3:21 PM, genius switch [EMAIL PROTECTED] wrote: Thanks Ariel! I will give that a shot this weekend and let you know how I do. I know plugging in localScroll will be simple enough, but I'm not sure about the easing. I'm quite bad at javascript... which is why I love jquery. Even a simple HTML/CSS developer and web designer such as myself can get stuff up and running fast :) - C On Nov 6, 8:33 am, Ariel Flesler [EMAIL PROTECTED] wrote: Sure, LocalScroll too. Both
[jQuery] Re: jCarousel, localScroll, other options?
Check LocalScroll's docs. That issue when setting the hash is the expected behavior. It's not recommended to combine the option hash when scrolling something else than the window, or scrolling just in 1 direction. There's nothing to do about that I think, it's one or the other. On Sat, Nov 8, 2008 at 12:40 PM, genius switch [EMAIL PROTECTED] wrote: Ok, I was able to debug both items. 1) The flash piece itself is the problem, not swfobject. Keep in mind, what you see here is very ugly right now since we're just starting dev, the clunky ugly flash piece is causing the problem here, and 2) the page jump only happens because the page itself is so tall. If I take away the whole bottom content and the page no longer creates a scrollbar in the browser window, the problem is fixed. That said, I'm not quite sure how i'll fix the second issue. I haven't had enough coffee yet... perhaps some absolute positioning of the top elements, and some top padding of the sections. Hmm... what do you think? - C On Nov 8, 12:25 am, genius switch [EMAIL PROTECTED] wrote: I'm almost there, i don't understand why it anchors the page to that section though (if you notice it moves the whole page up some). Also, a strange little bug in the easing scripting. I'm not sure if i'd call it a bug, but a conflict. I am using swfobject to put the flash on the page and it makes the easing effect not work. If I remove swfobject it works fine. http://www.geniusswitchstudio.com/v2/template.htm by the way thanks for all your awesome help! - C On Nov 7, 10:33 pm, Ariel Flesler [EMAIL PROTECTED] wrote: Also... whatever you put inside the $( ) should be one or more elements containing the links. Just in case, try: $(function() { $.localScroll({ easing:'easeOutQuart' }); }); On Fri, Nov 7, 2008 at 9:29 PM, genius switch [EMAIL PROTECTED] wrote: I'm doing something wrong of course... man why do I stink at javascript? script type='text/javascript' src='includes/scripts/ jquery-1.2.6.min.js'/script script type='text/javascript' src='includes/scripts/jquery.easing. 1.3.js'/script script type='text/javascript' src='includes/scripts/jquery.scrollTo- min.js'/script script type='text/javascript' src='includes/scripts/ jquery.localscroll-min.js'/script script type='text/javascript' src='includes/scripts/init.js'/ script script type=text/javascript $(function() { $(#content).localScroll({ easing:'easeOutQuart', } }); }); /script On Nov 6, 1:29 pm, Ariel Flesler [EMAIL PROTECTED] wrote: You include the easing plugin after jQuery, then when you call LocalScroll: $(...).localScroll( easing:'easeOutQuart', }); You can chose any equation, by name. On Thu, Nov 6, 2008 at 3:21 PM, genius switch [EMAIL PROTECTED] wrote: Thanks Ariel! I will give that a shot this weekend and let you know how I do. I know plugging in localScroll will be simple enough, but I'm not sure about the easing. I'm quite bad at javascript... which is why I love jquery. Even a simple HTML/CSS developer and web designer such as myself can get stuff up and running fast :) - C On Nov 6, 8:33 am, Ariel Flesler [EMAIL PROTECTED] wrote: Sure, LocalScroll too. Both allow you to specify an option called 'easing'. You need to add the easing plugin for fancy equations. Now that I check the demo, I think LocalScroll would fit better. Just link the buttons and panes by id/href. And it'll do the rest. -- Ariel Fleslerhttp://flesler.blogspot.com On Nov 5, 7:27 pm, genius switch [EMAIL PROTECTED] wrote: Can that be customized to have the bouncy effect? On Nov 5, 8:57 am, Ariel Flesler [EMAIL PROTECTED] wrote: Maybe SerialScroll ? -- Ariel Fleslerhttp://flesler.blogspot.com On Nov 5, 10:45 am, genius switch [EMAIL PROTECTED] wrote: Here is my issue, I have used jCarousel to accomplish what I need... however the markup is bothering my anal tendencies for pure semantics. I'm using jCarousel to scroll content blocks in a sexy way, however, in order to use jCarousel I must have my content blocks inside a list, each as a list item. This validates, and is functioning exactly how I want it to, however I can't get past the fact that this markup doesn't make sense. LocalScroll is my other option, but it doesn't slide sexy the way jCarousel does. Does anyone have any advice? Here is the test page:http://www.geniusswitchstudio.com/v2/template.htm Thanks! - C -- Ariel Fleslerhttp://flesler.blogspot.com -- Ariel
[jQuery] Re: jCarousel, localScroll, other options?
$(function() { $(#content).localScroll({ easing:'easeOutQuart' }); }); On Fri, Nov 7, 2008 at 9:29 PM, genius switch [EMAIL PROTECTED] wrote: I'm doing something wrong of course... man why do I stink at javascript? script type='text/javascript' src='includes/scripts/ jquery-1.2.6.min.js'/script script type='text/javascript' src='includes/scripts/jquery.easing. 1.3.js'/script script type='text/javascript' src='includes/scripts/jquery.scrollTo- min.js'/script script type='text/javascript' src='includes/scripts/ jquery.localscroll-min.js'/script script type='text/javascript' src='includes/scripts/init.js'/ script script type=text/javascript $(function() { $(#content).localScroll({ easing:'easeOutQuart', } }); }); /script On Nov 6, 1:29 pm, Ariel Flesler [EMAIL PROTECTED] wrote: You include the easing plugin after jQuery, then when you call LocalScroll: $(...).localScroll( easing:'easeOutQuart', }); You can chose any equation, by name. On Thu, Nov 6, 2008 at 3:21 PM, genius switch [EMAIL PROTECTED] wrote: Thanks Ariel! I will give that a shot this weekend and let you know how I do. I know plugging in localScroll will be simple enough, but I'm not sure about the easing. I'm quite bad at javascript... which is why I love jquery. Even a simple HTML/CSS developer and web designer such as myself can get stuff up and running fast :) - C On Nov 6, 8:33 am, Ariel Flesler [EMAIL PROTECTED] wrote: Sure, LocalScroll too. Both allow you to specify an option called 'easing'. You need to add the easing plugin for fancy equations. Now that I check the demo, I think LocalScroll would fit better. Just link the buttons and panes by id/href. And it'll do the rest. -- Ariel Fleslerhttp://flesler.blogspot.com On Nov 5, 7:27 pm, genius switch [EMAIL PROTECTED] wrote: Can that be customized to have the bouncy effect? On Nov 5, 8:57 am, Ariel Flesler [EMAIL PROTECTED] wrote: Maybe SerialScroll ? -- Ariel Fleslerhttp://flesler.blogspot.com On Nov 5, 10:45 am, genius switch [EMAIL PROTECTED] wrote: Here is my issue, I have used jCarousel to accomplish what I need... however the markup is bothering my anal tendencies for pure semantics. I'm using jCarousel to scroll content blocks in a sexy way, however, in order to use jCarousel I must have my content blocks inside a list, each as a list item. This validates, and is functioning exactly how I want it to, however I can't get past the fact that this markup doesn't make sense. LocalScroll is my other option, but it doesn't slide sexy the way jCarousel does. Does anyone have any advice? Here is the test page:http://www.geniusswitchstudio.com/v2/template.htm Thanks! - C -- Ariel Fleslerhttp://flesler.blogspot.com -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: jCarousel, localScroll, other options?
Also... whatever you put inside the $( ) should be one or more elements containing the links. Just in case, try: $(function() { $.localScroll({ easing:'easeOutQuart' }); }); On Fri, Nov 7, 2008 at 9:29 PM, genius switch [EMAIL PROTECTED] wrote: I'm doing something wrong of course... man why do I stink at javascript? script type='text/javascript' src='includes/scripts/ jquery-1.2.6.min.js'/script script type='text/javascript' src='includes/scripts/jquery.easing. 1.3.js'/script script type='text/javascript' src='includes/scripts/jquery.scrollTo- min.js'/script script type='text/javascript' src='includes/scripts/ jquery.localscroll-min.js'/script script type='text/javascript' src='includes/scripts/init.js'/ script script type=text/javascript $(function() { $(#content).localScroll({ easing:'easeOutQuart', } }); }); /script On Nov 6, 1:29 pm, Ariel Flesler [EMAIL PROTECTED] wrote: You include the easing plugin after jQuery, then when you call LocalScroll: $(...).localScroll( easing:'easeOutQuart', }); You can chose any equation, by name. On Thu, Nov 6, 2008 at 3:21 PM, genius switch [EMAIL PROTECTED] wrote: Thanks Ariel! I will give that a shot this weekend and let you know how I do. I know plugging in localScroll will be simple enough, but I'm not sure about the easing. I'm quite bad at javascript... which is why I love jquery. Even a simple HTML/CSS developer and web designer such as myself can get stuff up and running fast :) - C On Nov 6, 8:33 am, Ariel Flesler [EMAIL PROTECTED] wrote: Sure, LocalScroll too. Both allow you to specify an option called 'easing'. You need to add the easing plugin for fancy equations. Now that I check the demo, I think LocalScroll would fit better. Just link the buttons and panes by id/href. And it'll do the rest. -- Ariel Fleslerhttp://flesler.blogspot.com On Nov 5, 7:27 pm, genius switch [EMAIL PROTECTED] wrote: Can that be customized to have the bouncy effect? On Nov 5, 8:57 am, Ariel Flesler [EMAIL PROTECTED] wrote: Maybe SerialScroll ? -- Ariel Fleslerhttp://flesler.blogspot.com On Nov 5, 10:45 am, genius switch [EMAIL PROTECTED] wrote: Here is my issue, I have used jCarousel to accomplish what I need... however the markup is bothering my anal tendencies for pure semantics. I'm using jCarousel to scroll content blocks in a sexy way, however, in order to use jCarousel I must have my content blocks inside a list, each as a list item. This validates, and is functioning exactly how I want it to, however I can't get past the fact that this markup doesn't make sense. LocalScroll is my other option, but it doesn't slide sexy the way jCarousel does. Does anyone have any advice? Here is the test page:http://www.geniusswitchstudio.com/v2/template.htm Thanks! - C -- Ariel Fleslerhttp://flesler.blogspot.com -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: animated robot cartoon with jquery
Pretty cool! -- Ariel Flesler http://flesler.blogspot.com On Nov 6, 2:56 am, anthony.calzadilla [EMAIL PROTECTED] wrote: Hi all, I occasionally volunteer as a guest speaker for the web design class at my child's elementary school. I wanted to introduce them to jquery and html in a fun way so I created an animated jquery 'robot'. Now, I'm not really adept at javascript or any type of programming at all. I'm a designer turned wannabe' web developer :) I used multiple divs and transparent png's to create the different parts of the parallax background and the bouncing robot. The code I was able to piece together to make it work is absolutely horrendous, even for me. I was hoping maybe some of you jquery masters might be able to take a looksy and help me out? The url is: robot.anthonycalzadilla.com (I would just post the code but its so long it wouldn't be visibly viable) Anthony [EMAIL PROTECTED]
[jQuery] Re: jCarousel, localScroll, other options?
Sure, LocalScroll too. Both allow you to specify an option called 'easing'. You need to add the easing plugin for fancy equations. Now that I check the demo, I think LocalScroll would fit better. Just link the buttons and panes by id/href. And it'll do the rest. -- Ariel Flesler http://flesler.blogspot.com On Nov 5, 7:27 pm, genius switch [EMAIL PROTECTED] wrote: Can that be customized to have the bouncy effect? On Nov 5, 8:57 am, Ariel Flesler [EMAIL PROTECTED] wrote: Maybe SerialScroll ? -- Ariel Fleslerhttp://flesler.blogspot.com On Nov 5, 10:45 am, genius switch [EMAIL PROTECTED] wrote: Here is my issue, I have used jCarousel to accomplish what I need... however the markup is bothering my anal tendencies for pure semantics. I'm using jCarousel to scroll content blocks in a sexy way, however, in order to use jCarousel I must have my content blocks inside a list, each as a list item. This validates, and is functioning exactly how I want it to, however I can't get past the fact that this markup doesn't make sense. LocalScroll is my other option, but it doesn't slide sexy the way jCarousel does. Does anyone have any advice? Here is the test page:http://www.geniusswitchstudio.com/v2/template.htm Thanks! - C
[jQuery] Re: jCarousel, localScroll, other options?
You include the easing plugin after jQuery, then when you call LocalScroll: $(...).localScroll( easing:'easeOutQuart', }); You can chose any equation, by name. On Thu, Nov 6, 2008 at 3:21 PM, genius switch [EMAIL PROTECTED] wrote: Thanks Ariel! I will give that a shot this weekend and let you know how I do. I know plugging in localScroll will be simple enough, but I'm not sure about the easing. I'm quite bad at javascript... which is why I love jquery. Even a simple HTML/CSS developer and web designer such as myself can get stuff up and running fast :) - C On Nov 6, 8:33 am, Ariel Flesler [EMAIL PROTECTED] wrote: Sure, LocalScroll too. Both allow you to specify an option called 'easing'. You need to add the easing plugin for fancy equations. Now that I check the demo, I think LocalScroll would fit better. Just link the buttons and panes by id/href. And it'll do the rest. -- Ariel Fleslerhttp://flesler.blogspot.com On Nov 5, 7:27 pm, genius switch [EMAIL PROTECTED] wrote: Can that be customized to have the bouncy effect? On Nov 5, 8:57 am, Ariel Flesler [EMAIL PROTECTED] wrote: Maybe SerialScroll ? -- Ariel Fleslerhttp://flesler.blogspot.com On Nov 5, 10:45 am, genius switch [EMAIL PROTECTED] wrote: Here is my issue, I have used jCarousel to accomplish what I need... however the markup is bothering my anal tendencies for pure semantics. I'm using jCarousel to scroll content blocks in a sexy way, however, in order to use jCarousel I must have my content blocks inside a list, each as a list item. This validates, and is functioning exactly how I want it to, however I can't get past the fact that this markup doesn't make sense. LocalScroll is my other option, but it doesn't slide sexy the way jCarousel does. Does anyone have any advice? Here is the test page:http://www.geniusswitchstudio.com/v2/template.htm Thanks! - C -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: Fast trim implementation
This trim is faster than the regex-based one on most cases. Even for a small string, I get 30ms vs 55ms on FF3. IE is the only one that seems to have a great regex engine, or a dreadful js engine. In some cases, on very small strings, it is indeed slower. On Tue, Nov 4, 2008 at 7:14 PM, ricardobeat [EMAIL PROTECTED] wrote: Very clever implementation of yours. I believe the question is *what for* is the function being currently used? I believe most common cases are very short (15 chars) strings, usually small bits of data that are going to be thrown as hash keys or something. In that case the standard regexp version is still faster. Maybe trim() should switch between these two modes depending on the strings length? On Nov 4, 2:40 pm, Ariel Flesler [EMAIL PROTECTED] wrote: Hi As a follow up to Steven Levithan's post about string trimming[1]. I made a second version of trim that is performing quite well among different browsers (the 1st one I posted on his blog). If you're interested, I wrote an article[2] about this. If the implementation proves to be well rounded and effective, it could make it into the core, eventually. There's already a ticket[3] requesting a faster jQuery.trim() function. Comments (and testing) are much appreciated. Cheers [1]http://blog.stevenlevithan.com/archives/faster-trim-javascript [2]http://flesler.blogspot.com/2008/11/fast-trim-function-for- javascript.html [3]http://dev.jquery.com/ticket/2279 -- Ariel Fleslerhttp://flesler.blogspot.com -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: jCarousel, localScroll, other options?
Maybe SerialScroll ? -- Ariel Flesler http://flesler.blogspot.com On Nov 5, 10:45 am, genius switch [EMAIL PROTECTED] wrote: Here is my issue, I have used jCarousel to accomplish what I need... however the markup is bothering my anal tendencies for pure semantics. I'm using jCarousel to scroll content blocks in a sexy way, however, in order to use jCarousel I must have my content blocks inside a list, each as a list item. This validates, and is functioning exactly how I want it to, however I can't get past the fact that this markup doesn't make sense. LocalScroll is my other option, but it doesn't slide sexy the way jCarousel does. Does anyone have any advice? Here is the test page:http://www.geniusswitchstudio.com/v2/template.htm Thanks! - C
[jQuery] Re: how to parse tags with the name of title ?
Can you get us a test case ? -- Ariel Flesler http://flesler.blogspot.com/ On Nov 4, 6:35 am, AlexC [EMAIL PROTECTED] wrote: Hi all, I've just downloaded jQuery to see if I can use it in a web program and I've come across something which I don't know is a problem, a bug or just (quite likely) my lack of xml/jquery knowledge. I'm using the example at ...http://www.webmonkey.com/tutorial/Easy_XML_Consumption_using_jQuery?o... and if you change all the xml name tags in the referenced 'students.xml' test file to title it doesn't work. I guess this is because title is a reserved word? Anyone know how to get round this please because the xml files I'm consuming do have title in them. Many thanks Alex
[jQuery] Fast trim implementation
Hi As a follow up to Steven Levithan's post about string trimming[1]. I made a second version of trim that is performing quite well among different browsers (the 1st one I posted on his blog). If you're interested, I wrote an article[2] about this. If the implementation proves to be well rounded and effective, it could make it into the core, eventually. There's already a ticket[3] requesting a faster jQuery.trim() function. Comments (and testing) are much appreciated. Cheers [1]http://blog.stevenlevithan.com/archives/faster-trim-javascript [2]http://flesler.blogspot.com/2008/11/fast-trim-function-for- javascript.html [3]http://dev.jquery.com/ticket/2279 -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: other easing plugins than the standard ones?
yeap, you're not looking right :) http://www.google.com/search?q=jquery%20easing -- Ariel Flesler http://flesler.blogspot.com On Oct 31, 3:32 pm, Rene Veerman [EMAIL PROTECTED] wrote: Hi, i use .animate() in my cms and would like to try some other easing plugins besides linear and swing, the builtin ones. But i can't find any to download on the jquery site.. Maybe i'm not looking right.. Have you found them?
[jQuery] Re: jQuery Problem - Animated scrolling for in page links
Try this plugin: http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html -- Ariel Flesler http://flesler.blogspot.com On Oct 30, 9:01 am, mrleesimpson [EMAIL PROTECTED] wrote: Hi, I'm fairly new to jQuery and having some problems with getting a plugin to work with Wordpress. What I want to do is create a smooth animated vertical scroll for my in page (#contact and #work) links. I've attempted to use bothhttp://plugins.jquery.com/project/scrolltoandhttp://www.learningjquery.com/2007/10/improved-animated-scrolling-scr... but I can't get either to work. The site in question ishttp://www.mrleesimpson.co.uk/and the scripts I'm calling in my header are: script type='text/javascript' src='http://www.mrleesimpson.co.uk/wp- includes/js/jquery/jquery.js'/script script type='text/javascript' src='http://www.mrleesimpson.co.uk/wp- includes/js/scroller.js'/script Does anyone have any ideas as to why this might not be working?
[jQuery] Re: Scroll to top animate in Opera 9+
Well yes, that's not the better way of doing that. While it's quite popular, it's not the best solution. While it works well in most browsers, opera lets you scroll the window both by using the body or the documentElement (html). So you have 2 different running animations, competing with each other. Try using this plugin: http://flesler.blogspot.com/2007/10/jqueryscrollto.html It does all the hacking inside. Works well on all major browsers. -- Ariel Flesler http://flesler.blogspot.com/ On Oct 30, 12:46 pm, adexcube [EMAIL PROTECTED] wrote: Hi, I tried successfully this function $('html, body').animate({scrollTop: 0}, 'slow'); on most browsers but in Opera 9+ it doesn't behave correctly, just scrolls some content of the page while other remains static until the function stops? Does someone have noticed this? Thanks
[jQuery] Re: Resolving Namespace conflicts
jQuery plays well with other libraries and even with other jQuery instances. http://docs.jquery.com/Core/jQuery.noConflict There's a known incompatibility with Prototype 1.7.x (fixed by them on 1.8.x). Our last revision on trunk can co-exist even with that conflicting version of Prototype. http://docs.jquery.com/Core/jQuery.noConflict -- Ariel Flesler http://flesler.blogspot.com/ On Oct 29, 6:38 pm, Beier Cai [EMAIL PROTECTED] wrote: Hello, I'm planning to distribute my website's services to my clients using javascript, much like google map or ShareThis service. Basically my clients will include my external javascript file in their html header. I'd like to write my javascript code based on jQuery, but worrying about all those namespace conflicts. I have no control over what javascript library my clients' websites use, they may use prototype, mootools, they may even already use jQuery. What are the possible solutions to avoid all those conflicts? or as much as possible? Thanks for helping
[jQuery] Re: Question about Anchor-based URL navigation with jQuery
You can probably use one of these plugins (or both combined). http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html http://flesler.blogspot.com/2008/02/jqueryserialscroll.html The first one should do, but you can apply the 2nd for prev/next navigation. -- Ariel Flesler http://flesler.blogspot.com/ On Oct 29, 12:46 pm, McKaulick [EMAIL PROTECTED] wrote: Hello, I am currently working on a jquery slider for a customer's portfolio. The project is nearly done, but I am having an issue and I was wondering if someone could enlighten me with a problem that I am having. If you go to this page:http://sonata.websitewelcome.com/~tiptop/logo_design.php you will see that you can browse the logo projects. When there is a related project to a logo, an ajax function will feed a div with a thumbnail and a link to the page of the related category pointing to the right slide. If you click on the slide #9, you will see that the Boulangerie Nantaise logo is related to a packaging project. You can then click on the View Packaging link and it will bring you to the right slide on the packaging_design.php page. But after that, the browsing does not work anymore, the right-left buttons are not working and when you click on a number, it does not slide to it. I think it's because the browser's URL should not have the anchor and that messes up the function that slides through all pages but I have no clue how to fix this and if someone could help me figure that out, that would be great. Thank you, Patrice
[jQuery] Re: Want a demo of sliding Text..please help
Maybe something like this ? http://demos.flesler.com/jquery/serialScroll/ -- Ariel Flesler http://flesler.blogspot.com On Oct 29, 8:17 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi! Look at thishttp://docs.jquery.com/Effects/slideToggle There are many useful examples in official jQuery sitehttp://jquery.com On 29 окт, 12:11, @n!L...Reddy [EMAIL PROTECTED] wrote: Hi Friends.. A very Good MorningI am new to this group .i found this while searching... I want a Demo script of sliding Text . Please help If u have any idea of this. Thanks -Ani-
[jQuery] Re: $.fn.data() is significantly slowed down by $.fn.trigger().
Yeah.. I sort of agree. I know that these events are heavily used by jQuery UI... but indeed, $.data is called a lot (most function calls when I tested) and it's always calling trigger. -- Ariel Flesler http://flesler.blogspot.com On Oct 29, 11:02 am, Tim Molendijk [EMAIL PROTECTED] wrote: $.fn.data() internally uses $.fn.trigger() for whatever reason. When using $.fn.data() heavily, $.fn.trigger() starts to slow down the code. In my situation Firebug profiler tells me 20% of the time is consumed by $.fn.trigger() as a result of $.fn.data() calls. Shouldn't it be possible to get rid of $.fn.trigger() in $.fn.data() or make $.fn.trigger() more efficient?
[jQuery] Re: I think this is a binding issue
I wonder why no one's reading previous threads instead of just posting right away. -- Ariel Flesler http://flesler.blogspot.com/ On Oct 27, 9:11 am, Mike Alsup [EMAIL PROTECTED] wrote: If you click on A then click on Project 1 it will load in new content to the top. And the top is suppose to be able to scroll to the next image or back to the previous one if you click on the next and back links. like this example here http://selectreselect.com/sal/project1.html Can anyone help me piece this one together. Ive looked into live query and jquery.listen, but i have no clue on how to implement them. thanks This should help: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
[jQuery] Re: how to submit variables as POST submit (no AJAX)
I'd make those :text into :hidden, or set the form to display:none. -- Ariel Flesler http://flesler.blogspot.com/ On Oct 26, 10:38 am, Mike Alsup [EMAIL PROTECTED] wrote: I have a regular javascript object (with key/values) and would like to submit it to server by POST with complete page reload through jQuery. Just as with regular HTML forms. I searched for a few hours for some solution and have not found any. There are many examples for jQuery AJAX forms but I do not want AJAX. For instance there is $.post method, which accepts JS object as second parameter, however this is also AJAX method. I look for some soultion to send variables and completely re-request the page. Can anybody point me how that should be done? For that you would want to dynamically create a form and then submit it. For example: var s = 'form action=myURL method=POST'; // add inputs corresponding to your javascript object for (p in myObject) { s += 'input type=text name=' + encodeURIComponent(p) + ' value=' + encodeURIComponent(myObject[p]) + ' /';} s += '/form'; // add the form to the document var $form = $(s).appendTo('body'); // submit it $form.submit();
[jQuery] Re: Use JSON from .post
If you are indeed returning an array from PHP, then the received JSON should be a js array. Got this online ? -- Ariel Flesler http://flesler.blogspot.com/ On Oct 25, 6:26 pm, jfrymann [EMAIL PROTECTED] wrote: Hi, I have just started using jQuery and am trying to get data back from a mysql database in json format. I am using PHP to query the database and returning it with the json_encode method. (Basically I am following the example in the documentation -http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype) The problem I am having is that the example only returns one json object rather than an array of them and I'm not sure how to modify the calls to either the php encode json or how to access the data when it is returned through jquery. At the moment my php looks like this: while($row = mysql_fetch_array($result)) { echo json_encode(array(file=$row['name'],byline= $row['byline'])); } and the jQuery: $.post(getimages.php, { location: opt_choice, curr_img: img_cnt, limit: img_lim }, function(data){ alert(data); }, json); How can I set it up to access multiple objects? Thanks for the help!
[jQuery] Re: putting jquery inline
And type=text/javascript with no typos. -- Ariel Flesler http://flesler.blogspot.com/ On Oct 24, 9:04 pm, tres [EMAIL PROTECTED] wrote: Not to state the obvious, but did you make sure that the path to the jquery is correct? Trey On Oct 25, 4:39 am, snacktime [EMAIL PROTECTED] wrote: When I include jquery inline in the body via a script tag I'm getting jquery not defined errors. Is there a reason why this approach can't work, or does it sounds like I'm doing something else wrong? The only reason I'm doing this is because it's a requirement on the opensocial container surface I'm developing on. Chris
[jQuery] Re: can jquery slide a whole page up and down?
This is a great plugin for that: http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html It's called LocalScroll, you set up the markup, include the necessary scripts, a simple call and it turns your site into a cool site. Here's one awesome site using it: (by Alex Willcocks) http://www.engageinteractive.co.uk/ Cheers -- Ariel Flesler http://flesler.blogspot.com On Oct 22, 6:46 pm, caturn88 [EMAIL PROTECTED] wrote: I have been to websites in the past which I remember had no scroll bars, relying on buttons to navigate the site. I got the impression the whole site was a massive page, so only one section could be viewed at a time. The really nice thing was that going to a new page would slide there, instead of refreshing and blinking the whole browser window as with HTML. Can jquery do this?
[jQuery] Re: stop link returning to the top
This plugin can do: http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html If you don't want that behavior (of adding the hash to the address bar), don't add/keep the setting called 'hash'. -- Ariel Flesler http://flesler.blogspot.com/ On Oct 23, 1:28 am, caturn88 [EMAIL PROTECTED] wrote: I found a script which provides a smooth scrolling action to give the impression of an infinite page. However as inexperienced as I am I failed to integrate it with another piece of code that controls a JQuery button. The following page has the page scrolling JavaScript and the JQuery button together, as you can see the Description link will scroll to the bottom of the page, but then go strait back to the top (this is only a test link I actually want the green button to be the link but I'm not sure how to do that bit), I need to stop the page from returning to the top, which I am not sure why it does? website:http://lovelago.googlepages.com/test8.html .thanks in advance.
[jQuery] Re: Proposal: new method for determining variables without value
Agree. Note that !!('') is also false. And [] == false. -- Ariel Flesler http://flesler.blogspot.com/ On Oct 23, 2:11 am, Michael Geary [EMAIL PROTECTED] wrote: I looked at James Edwards' post, and I'm not seeing how this function is all that useful. (I mean no offense to pd; it's always worth looking at interesting bits of code like this, and I appreciate it being brought up.) Half of the code merely duplicates what JavaScript does for you and could be replaced by a simple ! operator. Undefined? Null? The number zero? The boolean value false? All built in, so why bother with all that code? The other half implements a fairly specialized notion of what empty means. A string whose value is '0', or '', or only whitespace? An empty array? An object with no enumerable properties? Well, sure, if that's exactly what you need to test for. But why not just test for the specific thing you need instead of using a general pupose function with its own ideas of what is true and false that may or may not match your needs? -Mike _ From: chris thatcher you should cc the jquery-dev list for this idea as well, to ensure those developers see it. thatcher On Wed, Oct 22, 2008 at 7:34 PM, pd [EMAIL PROTECTED] wrote: Hi All This idea by James Edwards seems like a winner and an ideal candidate for a new jQuery core utility method: http://www.sitepoint.com/blogs/2008/10/16/techy-treasures-1/ Obviously his choice of name conflicts with the jQuery .empty() method however another name could be used such as: hasValue() This method would simply return a boolean response. What does everyone think? pd -- Christopher Thatcher
[jQuery] Re: img load event not working
$(...).bind(load, OnImageLoaded).attr('src','the_image_uri'); -- Ariel Flesler http://flesler.blogspot.com/ On Oct 23, 3:52 pm, Jimbo M [EMAIL PROTECTED] wrote: I can't get this to work for anything. I'm trying to set up an event to fire a trigger when an image is done loading. Neither of the following snippets end up ever calling the OnImageLoaded function. $(...).load(OnImageLoaded) $(...).bind(load, OnImageLoaded) I've cleared the cache to ensure it's not a caching thing. Can anyone see what I'm missing here? --- Jim ---
[jQuery] Re: Puedo indexar directamente los jquerys de Google?
Esta esta lista por si no la conoces: http://lists.scriptia.net/listinfo.cgi/jquery-es-scriptia.net -- Ariel Flesler http://flesler.blogspot.com On Oct 23, 7:03 pm, America|UNK [EMAIL PROTECTED] wrote: Habrá algún problema si lo pongo en mi head ? script type=text/javascript src=http://jqueryjs.googlecode.com/ files/jquery-1.2.6.min.js/script
[jQuery] Re: Atribute selector with squared brackets
PHP automatically generates arrays from these kind of POST/GET keys. That's probably the main reason. On Tue, Oct 21, 2008 at 7:58 PM, ricardobeat [EMAIL PROTECTED] wrote: That's kind of what I meant to say. From my understanding, the CDATA rules apply if you are serving XHTML as application/xhtml+xml. If you are serving as text/html it is implied you are being backwards compatible, so you should go by the HTML4 rules where only A-z,0-9,._- characters are allowed. Anyway I was just being picky. Everybody uses { in class attributes for metadata already, and most browsers (even the ones that don't support XHTML as application/xml) don't have a problem with that, I don't know how far down the chain that becomes a problem (IE5?). http://www.w3.org/TR/xhtml1/#C_8 What I really wanted to say is 'why are these lunatics putting brackets in IDs/names? there are plenty of unused/unmeaningful characters to choose' ;) - ricardo On Oct 21, 4:34 pm, jasonkarns [EMAIL PROTECTED] wrote: In XHTML, the name attribute on input (and textarea and select) elements is defined as CDATA not NMTOKEN thus, brackets are legal in name attributes on input elements. It is NOT backwards compatible with HTML, where the character restriction is [a-z][A-Z]-_ and . Further note, the id attribute has it's own separate set of restrictions that are a subset of all HTML attributes. http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-transitional.dt...http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-transitional.dt...http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-transitional.dt. .. ~Jason On Oct 21, 12:07 pm, ricardobeat [EMAIL PROTECTED] wrote: Brackets are an invalid character in attributes, for XHTML served as text/html, which I guess accounts for most of jQuery usage anyway. Looks like someone already updated the docs. - ricardo On Oct 20, 11:36 pm, Ariel Flesler [EMAIL PROTECTED] wrote: We got a ticket about how to select elements by an attribute with brackets. I replied with the common link to the FAQ and the reporter replied that the example in the docs doesn't work. I tried that myself, and indeed, that didn't work. http://dev.jquery.com/ticket/3443 $('[name=foo[bar]]'); // Doesn't work $('[name=foo\\[bar\\]]'); // Should work, but doesn't $('[name=foo[bar]]'); // Does work Now... I think the last option is good enough. But we need to update the docs. Anything to add ? Anyone volunteers to update the docs ? Cheers -- Ariel Fleslerhttp://flesler.blogspot.com/ -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Atribute selector with squared brackets
We got a ticket about how to select elements by an attribute with brackets. I replied with the common link to the FAQ and the reporter replied that the example in the docs doesn't work. I tried that myself, and indeed, that didn't work. http://dev.jquery.com/ticket/3443 $('[name=foo[bar]]'); // Doesn't work $('[name=foo\\[bar\\]]'); // Should work, but doesn't $('[name=foo[bar]]'); // Does work Now... I think the last option is good enough. But we need to update the docs. Anything to add ? Anyone volunteers to update the docs ? Cheers -- Ariel Flesler http://flesler.blogspot.com/
[jQuery] Re: JCarousel - How to scoll a fixed width of pixels?
You can try SerialScroll: http://flesler.blogspot.com/2008/02/jqueryserialscroll.html It handles situations where elements have different dimensions and can be even unaligned (x and/or y). -- Ariel Flesler http://flesler.blogspot.com On Oct 17, 6:53 am, greencube [EMAIL PROTECTED] wrote: I'm testing JCarousel for a project and trying to figure out if it is possible to scroll a fixed with of pixel when I click on prev and next buttons instead of a specified number of items. I need this because the images will be of varying width, but the same height. One clip-window will have 3 images, another 2 etc. Have anyone tried something like this?
[jQuery] Re: SerialScroll navigation modification question
Ok, nice to know :) There is one snippet to generate sort of a simple pagination, based on the items. -- Ariel Flesler http://flesler.blogspot.com On Oct 15, 6:54 am, Armand Datema [EMAIL PROTECTED] wrote: FYI this functionality also works great with the pagination plagin you only need to modify it a bit the pagination plugin returns a span for the first item, this needs to be changed to a standard link var lnk = $(a class='active'+(appendopts.text)+/a) and because the click handler is handled by the serialscroll plugin you need to delete that from the pagination plugin as well //.bind(click, getClickHandler(page_id)) so in my case i first call the pagination plgin to create a nr of links based on the nr of items in my news dataset , adn then i call the serialscroll to make this into a scroller and attach the navigation to the before created paging links Armand On Tue, Oct 14, 2008 at 2:59 PM, Ariel Flesler [EMAIL PROTECTED] wrote: Nope, I thought I had a snippet for this on the Doctorate on... post, it seems I forgot to add this one. Will do as soon as I can. -- Ariel Flesler http://flesler.blogspot.com On Oct 14, 6:13 am, Armand Datema [EMAIL PROTECTED] wrote: Thanks thats about how I solved it also just wanted to check if somehow this was allready included int he plugin and I missed it Armand On Fri, Oct 10, 2008 at 10:33 PM, Ariel Flesler [EMAIL PROTECTED] wrote: You have 2 options. - Binding externally: var $links = $('#navigation a').click(function(){ $links.removeClass('selected'); $(this).addClass('selected'); }); - Using the onBefore callback. I think the first one is simple and safe. I'd go for that. Cheers -- Ariel Flesler http://flesler.blogspot.com On Oct 9, 8:37 am, Armand Datema [EMAIL PROTECTED] wrote: Hi I am using the serialscroll on my site to page through a news resultset. I am using the naviagation option that automatically turns a given list into the naviagation for this scroller. However I would like to have the link in the ul have a new class when its clicked so I can style this differently, whats the best way to do this. thanks in advance Armand -- Armand Datema CTO SchwingSoft -- Armand Datema CTO SchwingSoft
[jQuery] Re: Error: $(#slider).serialScroll is not a function
The screencast is not too useful. Do you have a link of this online ? Check the script tab with Firebug, go into each script and make sure none is 404. -- Ariel Flesler http://flesler.blogspot.com On Oct 11, 8:08 pm, designjockey [EMAIL PROTECTED] wrote: also.. please see this screencasthttp://screencast.com/t/m30XesSCsNp which shows the firebug console with the error. On Oct 11, 6:03 pm, designjockey [EMAIL PROTECTED] wrote: Ariel, Thanks for your reply, i was on your blog earlier too(from jqueryfordesigners) trying to find an answer.. all the scripts seem to be there... here is a screencast of all the scripts in there...http://screencast.com/t/5bxlkdeo I would really really appreciate any help at all. Thank you. Ritz On Oct 11, 5:34 pm, Ariel Flesler [EMAIL PROTECTED] wrote: You need to include the rest of the required scripts before this one. -- Ariel Fleslerhttp://flesler.blogspot.com On Oct 11, 3:52 pm, designjockey [EMAIL PROTECTED] wrote: Hello, Can someone please help me, I am trying to use this with the On Demand theme for wordpress and i get the below error. I am a designer not a coder, so I am finding it difficult to wrap my head around this problem... please help... digital_deejay at hotmail.com Error: $(#slider).serialScroll is not a function Source File:http://www.gamertagradio.com/videos/wp-content/themes/ondemand/script... Line: 95
[jQuery] Re: SerialScroll navigation modification question
Nope, I thought I had a snippet for this on the Doctorate on... post, it seems I forgot to add this one. Will do as soon as I can. -- Ariel Flesler http://flesler.blogspot.com On Oct 14, 6:13 am, Armand Datema [EMAIL PROTECTED] wrote: Thanks thats about how I solved it also just wanted to check if somehow this was allready included int he plugin and I missed it Armand On Fri, Oct 10, 2008 at 10:33 PM, Ariel Flesler [EMAIL PROTECTED] wrote: You have 2 options. - Binding externally: var $links = $('#navigation a').click(function(){ $links.removeClass('selected'); $(this).addClass('selected'); }); - Using the onBefore callback. I think the first one is simple and safe. I'd go for that. Cheers -- Ariel Flesler http://flesler.blogspot.com On Oct 9, 8:37 am, Armand Datema [EMAIL PROTECTED] wrote: Hi I am using the serialscroll on my site to page through a news resultset. I am using the naviagation option that automatically turns a given list into the naviagation for this scroller. However I would like to have the link in the ul have a new class when its clicked so I can style this differently, whats the best way to do this. thanks in advance Armand -- Armand Datema CTO SchwingSoft