[jQuery] Re: IE8.

2009-01-11 Thread Thomas Kahn


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.


Is there more info on jQuery combined with Internet Explorer 8 that I 
could read?


I have a situation where a client wants me to do bugfixes for IE8 beta 
2 on a site using a lot of jQuery. The site works fine in all other 
browsers so I would prefer to wait until IE8 comes out of the beta stage.


An open question to other jQuery developers: are you checking your sites 
for IE8 compatibility now or are you waiting until IE8 is out of the 
beta stage?


I'm thinking it's not a very good idea to look for and try to fix bugs 
right now since it's hard to determine if the errors are caused by my 
code, Microsofts code, jQuery+IE8 compatibility issues or a combination 
of all of this.


Thanks in advance!

/Thomas Kahn


[jQuery] Re: New plugin: jquery.smoothDivScroll-0.5.js

2008-11-01 Thread Thomas Kahn


Sam Sherlock wrote:
Nice stuff there.  I have been playing around with it I would like to be 
able to click on the arrows and advance more rapidly through the 
scrollablearea.  Guess this might be going against what your trying to do.


Adding a click event that makes the scrolling go faster is a great idea! 
I will add it to the list of things to implement.


Perhaps also some class should be added so that certain styling is 
applied where js is able to run


I'm not sure I understand? Could you elaborate on this?

if some extra options could be specificed when initializing - in some 
cases it would be nice to be able display the items in sets of 4 
(configurable rows  columns) perhaps also being able to initialze to a 
position (like scrollable plugin see flowplayer example site)


Yes, more options should be added. One thing I've been thinking of is 
that the user shouldn't have to add the hotspots manually in the 
HTML/CSS-code. The script should be able to generate default hotspots.


I'm not sure which options the users would like or find handy though? 
Many settings can be done in the CSS but I'm not sure if that is the 
best way to configure the plugin?


I'm not sure that I want this plugin to scroll in sets. There are 
already several plugins that do that, but that was not the functionality 
 I was looking. Smooth scrolling is what I'm after. :-)


Would be interesting to be able to use this with lazyloading images 
(preloading two adhead)


That is my plan!
I will be using ten or more of the scrolling DIV's on a single page so 
loading all the content at once would be heavy.


Thanks for your feedback!

/Thomas


2008/11/1 tkahn [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]


Hi!

My name is Thomas Kahn and this is my first post to this list. I'm a
web developer working in Stockholm Sweden and I've just started
developing my my first plugin for jQuery; in fact jQuery is a totally
new experience for me - I started from scratch a week ago.  :-)

All the info, a demo and the current source code can be found here:

http://www.maaki.com/thomas/SmoothDivScrolling/

All the scrolling plugins that I found on the jQuery website where
scrolling in element steps and I wanted a plugin that would scroll
smoothly. Since I couldn't find one, I decided to code one myself.

Now I'm releasing somehing that is really a Beta with a big B. It
wasn't intended to be released in public in the first place, but when
I saw that I would save time by developing a plugin for the project
that I'm currently involved in, I tought I'd share the code hoping
someone else will find it useful.

All improvements and suggestions are welcome!

/Thomas Kahn
Web Developer
Kärnhuset, Sweden






[jQuery] Re: New plugin: jquery.smoothDivScroll-0.5.js

2008-11-01 Thread Thomas Kahn


Thanks a million Mike!
This is EXACTLY the kind of tips'n'tricks that I need to learn. I will 
address all the things you point out as soon as I have the time!


/Thomas

Mike Alsup wrote:

All improvements and suggestions are welcome!


Some quick comments on the code itself, not the implementation, just
the technical bits:

1.)  Your plugin is not chainable.  The plugin function should 'return
this' to honor jQuery's chaining model.  For example, this will fail:
$('div').smoothDivScroll().parent().show();

2.)  Your plugin code is written with the assumption that a single
element has been selected.  But in reality your $mom variable could
represent a set of elements if I call your plugin like this:  $
('div').smoothDivScroll();
Based on what I see in the code I'm pretty sure this will not work as
expected.  What you need inside the plugin is an iteration loop so
that you can loop over each selected element:
this.each(function() {
   // treat each item in here as a 'mom'
}

3.)  There are several places in the code where you use a document-
ready handler - $(function(... -  but it's safe to assume that your
plugin is invoked within a document-ready handler, and so these
functions you defined will execute immediately.  In other words, you
can just run those bits of code w/o the 'ready'.

Nice work on the demo and the write-up.  The results look rather nice.

More plugin tips can be found here:
http://docs.jquery.com/Plugins/Authoring
http://www.learningjquery.com/2007/10/a-plugin-development-pattern
http://malsup.com/jquery/conf08/

Cheers!

Mike