[jQuery] Re: HTML annotation techniques.

2009-03-19 Thread David Decraene

depending on the purpose, you could use :

RDfa: http://www.w3.org/TR/xhtml-rdfa-primer/

or perhaps start using html 5 data attributes, see post from john:
http://ejohn.org/blog/html-5-data-attributes/

Greetings,
David

http://ontologyonline.org
jowl semantic javascript library: http://jowl.ontologyonline.org

On 19 mrt, 17:06, Bryan Larsen  wrote:
> I'm looking for a good HTML annotation method so that I can pass
> metadata for html tags to jQuery scripts.
>
> I found this pagehttp://www.1729.com/blog/HtmlAnnotations.htmlwhich
> surveys 9 different mechanisms.
>
> So far, I've tried the first mechanism (JSON in a script tag before
> the element to be annotated), which fails because 
> ofhttp://groups.google.com/group/jquery-en/browse_thread/thread/7d25002
>
> Then I found the article, and tried the last mechanism (HTML
> comments).  However, jQuery appears to have no mechanism for selecting
> comments.  I've worked around this by using the native DOM traversal
> functions.  However, I'm sure my code would be more robust if this was
> supported within jQuery.
>
> Will jQuery support comment extraction in the future?  Does anybody
> have any other nice HTML annotation techniques?
>
> thanks,
> Bryan


[jQuery] [Announce] jOWL 1.0 released

2009-03-11 Thread David Decraene

I'm happy to announce the release of jOWL version 1.0

jOWL (http://jowl.ontologyonline.org) is a jQuery plugin to load and
visualize semantic information from OWL (Web Ontology Language) files.

This version incorporates smarter reasoning, faster loading and many
other goodies.

David
jOWL semantic javascript library : http://jowl.ontologyonline.org
Visualizing ontologies with treeviews, html templating, touchgraphs
and SPARQL-DL



[jQuery] Re: jQuery-dependent TouchGraph Visualization (experiment)

2009-01-08 Thread David Decraene

Well, suprisingly there was an issue with drawing.
The script made an overzealous use of the jquery function
$element.offset();
Storing the position as variable instead of accessing it by offset()
led to a very notable increase in performance.

See demo at http://jowl.ontologyonline.org/TouchGraph.html



On 8 jan, 08:37, David Decraene  wrote:
> The great thing of html of course is that you can use css, means you
> can style it easily (demo has very basic styling, some rounded corners
> in firefox).
> Not sure how flexible styling in raphael is, I'm not familiar enough
> with it.
> Also don't think canvas or svg will be any faster, because the issue
> is not with drawing the changes, but with calculating the position of
> each node (=Javascript Math).
>
> On Jan 8, 2:27 am, Ricardo Tomasi  wrote:
>
> > using "NO" Canvas or SVG is not that great a feature is it? :)
>
> > Make that use raphael.js and it's all set!
>
> > On Jan 7, 5:13 pm, David Decraene  wrote:
>
> > > Thanks!
>
> > > It does need some computations that scale exponentially with the
> > > amount of nodes shown...
> > > but I think it seems to perform ok with a not too high amount of
> > > nodes, for an implementation that only uses html elements. Who nows,
> > > with future browsers (or a better algorithm :)) things might scale
> > > better...
>
> > > Greetings
> > > David
>
> > > On 7 jan, 19:00, Joe  wrote:
>
> > > > Very impressive!  Seems a bit sluggish at times in FF 3.0.5, but nice
> > > > work!
>
> > > > Joe
>
> > > > On Jan 7, 5:12 am, David Decraene  wrote:
>
> > > > > I had some fun creating a pure HTML-DOM based Force-directed graph
> > > > > layout, similar to a touchgraph (http://www.touchgraph.com/) view.
>
> > > > > Built with the help of jQuery (hereby again: wonderful library), no
> > > > > canvas or SVG used (only DOM manipulations).
>
> > > > > You can see an experimental demo 
> > > > > at:http://jowl.ontologyonline.org/TouchGraph.html.
> > > > > and the blog 
> > > > > post:http://ontologyonline.blogspot.com/2009/01/experimental-touchgraph-vi
>
> > > > > Room for lot's of improvement, but nevertheless quite happy with the
> > > > > result already.
>
> > > > > David Decraenehttp://ontologyonline.org


[jQuery] Re: jQuery-dependent TouchGraph Visualization (experiment)

2009-01-07 Thread David Decraene

The great thing of html of course is that you can use css, means you
can style it easily (demo has very basic styling, some rounded corners
in firefox).
Not sure how flexible styling in raphael is, I'm not familiar enough
with it.
Also don't think canvas or svg will be any faster, because the issue
is not with drawing the changes, but with calculating the position of
each node (=Javascript Math).

On Jan 8, 2:27 am, Ricardo Tomasi  wrote:
> using "NO" Canvas or SVG is not that great a feature is it? :)
>
> Make that use raphael.js and it's all set!
>
> On Jan 7, 5:13 pm, David Decraene  wrote:
>
> > Thanks!
>
> > It does need some computations that scale exponentially with the
> > amount of nodes shown...
> > but I think it seems to perform ok with a not too high amount of
> > nodes, for an implementation that only uses html elements. Who nows,
> > with future browsers (or a better algorithm :)) things might scale
> > better...
>
> > Greetings
> > David
>
> > On 7 jan, 19:00, Joe  wrote:
>
> > > Very impressive!  Seems a bit sluggish at times in FF 3.0.5, but nice
> > > work!
>
> > > Joe
>
> > > On Jan 7, 5:12 am, David Decraene  wrote:
>
> > > > I had some fun creating a pure HTML-DOM based Force-directed graph
> > > > layout, similar to a touchgraph (http://www.touchgraph.com/) view.
>
> > > > Built with the help of jQuery (hereby again: wonderful library), no
> > > > canvas or SVG used (only DOM manipulations).
>
> > > > You can see an experimental demo 
> > > > at:http://jowl.ontologyonline.org/TouchGraph.html.
> > > > and the blog 
> > > > post:http://ontologyonline.blogspot.com/2009/01/experimental-touchgraph-vi
>
> > > > Room for lot's of improvement, but nevertheless quite happy with the
> > > > result already.
>
> > > > David Decraenehttp://ontologyonline.org


[jQuery] Re: jQuery-dependent TouchGraph Visualization (experiment)

2009-01-07 Thread David Decraene

Thanks!

It does need some computations that scale exponentially with the
amount of nodes shown...
but I think it seems to perform ok with a not too high amount of
nodes, for an implementation that only uses html elements. Who nows,
with future browsers (or a better algorithm :)) things might scale
better...

Greetings
David

On 7 jan, 19:00, Joe  wrote:
> Very impressive!  Seems a bit sluggish at times in FF 3.0.5, but nice
> work!
>
> Joe
>
> On Jan 7, 5:12 am, David Decraene  wrote:
>
> > I had some fun creating a pure HTML-DOM based Force-directed graph
> > layout, similar to a touchgraph (http://www.touchgraph.com/) view.
>
> > Built with the help of jQuery (hereby again: wonderful library), no
> > canvas or SVG used (only DOM manipulations).
>
> > You can see an experimental demo 
> > at:http://jowl.ontologyonline.org/TouchGraph.html.
> > and the blog 
> > post:http://ontologyonline.blogspot.com/2009/01/experimental-touchgraph-vi
>
> > Room for lot's of improvement, but nevertheless quite happy with the
> > result already.
>
> > David Decraenehttp://ontologyonline.org


[jQuery] jQuery-dependent TouchGraph Visualization (experiment)

2009-01-07 Thread David Decraene

I had some fun creating a pure HTML-DOM based Force-directed graph
layout, similar to a touchgraph (http://www.touchgraph.com/) view.


Built with the help of jQuery (hereby again: wonderful library), no
canvas or SVG used (only DOM manipulations).


You can see an experimental demo at: 
http://jowl.ontologyonline.org/TouchGraph.html.
and the blog post: 
http://ontologyonline.blogspot.com/2009/01/experimental-touchgraph-visualization.html.

Room for lot's of improvement, but nevertheless quite happy with the
result already.

David Decraene
http://ontologyonline.org


[jQuery] Re: xml parsing error

2008-06-19 Thread David Decraene

Are you loading that xml file locally? That may be the problem:

try something like this for local xml file access:

if($.browser.msie && location.toString().indexOf('file') == 0) { //
stupid IE won't load local xml files with XMLHttpRequest
var xml = document.createElement("xml");
xml.validateOnParse = false; //avoid DTD errors 
(if it's an issue)
xml.src = path;
xml.onreadystatechange = function()
{
if(xml.readyState == "interactive")  { 
var xmldoc =
xml.XMLDocument; document.body.removeChild(xml);callback(); }
}
document.body.appendChild(xml);
}
Hope it helps
David
http://ontologyonline.org

On Jun 19, 12:35 am, koko <[EMAIL PROTECTED]> wrote:
> no alerts at all in IE , I tried it on different systems (3 pcs) , but
> no alert shows ... I followed it with firebug and I discovered that IE
> does not enter success function at all.
>
> thanks for replying
>
> On Jun 18, 4:54 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
>
> > well for meit works in ff3, ff2, ie6, ie7, ie8b1 and opera 8 and opera 9.5b
> > also safari 3(windows xp)
>
> > I get two alert pop up first
> > 0-1
> > then
> > 1-2
>
> > what is not working for you? double check that you have no errors syntax /
> > mark up
>
> > every time I try this it works fine - whatever browser I opt for.
>
> > the first number is the iteration the second the data in the element
> > 2008/6/18 koko <[EMAIL PROTECTED]>:
>
> > > Thanks but it's not working !!! I'm using IE7 for testing , maybe in
> > > IE6 it's wroking
>
> > > any solution?


[jQuery] Re: ajax and XML - issue with file extensions?

2008-05-27 Thread David Decraene

hagalaz, you are right,
using $.get() instead of $.ajax() fixes the problem,

but that does mean that this is a genuine bug?
Can somebody look into it?

example:

this works for path = file.owl:
$.get(path, function(xml){callback(that.parse(xml, options));});

this does not work for path = file.owl:
$.ajax({ url: path, dataType: "xml", success: function(xml)
{callback(that.parse(xml, options));}});

david decraene
http://jowl.ontologyonline.org

On 27 mei, 08:45, hagalaz <[EMAIL PROTECTED]> wrote:
> I had similar issues with the ajax function. Then I switched to .get
> and .post and all worked seamlessly. (I create xml content dynamically
> with PHP)
>
> On May 26, 9:35 pm, David Decraene <[EMAIL PROTECTED]>
> wrote:
>
> > I have noticed some rather peculiar behavior with the ajax function:
>
> > I have a file called person.owl, which contains xml syntax, and when
> > trying to load that file the ajax call triggers the error function
> > (parsererror) / fails to load.
>
> > However, if I rename the file to person.xml (e.g. change the
> > extension) I have no problems whatsoever anymore, the file loads
> > successfully.
>
> > Anything I can do to avoid this behaviour (with exception of
> > renaming?), it seems to be reproducible.
>
> > Spotted the bug when working on a plugin I'm writing, the owl (web
> > ontology language) extension is something encountered frequent in this
> > setting:
> > jOWL, a semantic javascript library athttp://jowl.ontologyonline.org/
>
> > David Decraene.http://ontologyonline.org


[jQuery] Re: Javascript breakout Game

2008-05-23 Thread David Decraene

Looks like my previous comment did not make it through:
the invisible block is a small glitch, but perhaps it more fun to
leave it in than to not to :)
I think it has something to do with array.splice perhaps not allowing
to splice the last element (not really sure otherwise).

On May 22, 9:22 pm, "Theodore Ni" <[EMAIL PROTECTED]> wrote:
> Very nice. I got to 111 points before I got bored; is there supposed to be
> an invisible block in the upper left for you to keep hitting? :-)
>
> On Thu, May 22, 2008 at 2:21 PM, David Decraene <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
>
> > I took my mind of things and had some fun with jQuery, John's Simple
> > Javascript Inheritance Script and the canvas element.
>
> > The result is a simple Breakout game that can be seen at:
> >http://ontologyonline.org/jGames/breakout.html
>
> > A word on browser compatibility:
>
> > It doesn't work in Evil IE (Internet Explorer), which doesn't provide
> > proper support for the canvas element.
> > In IE it can be made functional with excanvas but it renders way too
> > slow to be enjoyable.
>
> > David Decraene
> >http://ontologyonline.org
>
> --
> Ted


[jQuery] Javascript breakout Game

2008-05-22 Thread David Decraene

I took my mind of things and had some fun with jQuery, John's Simple
Javascript Inheritance Script and the canvas element.

The result is a simple Breakout game that can be seen at:
http://ontologyonline.org/jGames/breakout.html

A word on browser compatibility:

It doesn't work in Evil IE (Internet Explorer), which doesn't provide
proper support for the canvas element.
In IE it can be made functional with excanvas but it renders way too
slow to be enjoyable.




David Decraene
http://ontologyonline.org


[jQuery] Re: Ajax scoping problem

2008-01-22 Thread David Decraene

also If you do something like this (don't know if you do):

var myarray = new Array();

function readXml(){ ..ajax.. }

function handleXML(xml) {   myarray[i] == ...}

var x = myarray.length;

then x will always be 0 because myarray.length get's executed before
the ajax call returns success (asynchronous).

David


[jQuery] Re: Ajax scoping problem

2008-01-22 Thread David Decraene

why not:
var myarray = new Array();
 function handleXML(xml) {
$(xml).find("something somethingelse").each(function(){
   myarray.push( $(this).text());
   });

Can't see why that wouldn't work.
David
http://OntologyOnline.org


On Jan 22, 11:53 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I'm probably being daft, but I'm trying to populate an array by
> processing some xml but my (global) array gets destroyed when the ajax
> function has done it's job. I know it's because the ajax function. I
> know it's a scoping problem but I don't know how to fix it and most
> fixes I found online didn't work;
>
> My code goes something like this:
>
> var myarray = new Array();
>
> function readXml() {
>$.ajax({
>   type: "POST",
>   url: story_data_xml_path,
>   dataType: "xml",
>   success: handleXml
>});
>
> }
>
> function handleXML(xml) {
>$(xml).find("something").each(function(i){
>myarray[i] = $(this).find("somethingelse").text();
>});
>
> }


[jQuery] Re: xml parsing - what am i doing wrong?

2008-01-21 Thread David Decraene

and even if it would return on time (synchronous call) you wouldn't
really return it with datascape.getAllAnchors (return is wrapped
inside the get object).

This might or might not work depending on the timing:
datascape.getAllAnchors = function(anchors){
$.get("projects/datascapes.xml",function(data){
   anchors  = $(data);
});
}
depends on how fast you need it, but it's better to wrap everything in
a function that only gets executed once the data has been completely
loaded?

function dosomething(data){
var xx = data. etc
  var thisDS = $('scape[title="'+UI.section+'"]', datascape.anchors);
var dsAnchorVar = $('item[title="' + $proj +
'"]',thisDS).parents('col').attr('title');
$.log("anchor "+$proj+"= "+ dsAnchorVar );

}

$.get("projects/datascapes.xml",dosomething);

David
http://ontologyonline.org

On Jan 21, 3:53 pm, David Decraene <[EMAIL PROTECTED]> wrote:
> the get is asynchronous,
> meaning that datascape.getAllAnchors is returned (nothing/undefined)
> before the ajaxall (get) returns success.
>
> On Jan 21, 3:41 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
> wrote:
>
> > Hello,
>
> > i'm loading a bit of xml and i'm trying to use the loaded data, but i 'm 
> > unsuccessful traversing it so far. Can you tell me what i'm doing wrong?
>
> > here is the loading code:
>
> > datascape.getAllAnchors = function(){
> > $.get("projects/datascapes.xml",function(data){
> > return $(data);
> > });
>
> > }
>
> > then further down, i need to retrieve an item's parent  col element "title" 
> > attribute.
>
> > jQuery(function($){
>
> > ...
>
> > var thisDS = $('scape[title="'+UI.section+'"]', datascape.anchors);
> > var dsAnchorVar = $('item[title="' + $proj + 
> > '"]',thisDS).parents('col').attr('title');
> > $.log("anchor "+$proj+"= "+ dsAnchorVar );
>
> > });
>
> > the console keeps on showing dsAnchorVar as "undefined"
>
> > the xml file:
>
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
>
> > 
> > 
>
> > Thanks for any help,
>
> > Alexandre


[jQuery] Re: xml parsing - what am i doing wrong?

2008-01-21 Thread David Decraene

the get is asynchronous,
meaning that datascape.getAllAnchors is returned (nothing/undefined)
before the ajaxall (get) returns success.


On Jan 21, 3:41 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> i'm loading a bit of xml and i'm trying to use the loaded data, but i 'm 
> unsuccessful traversing it so far. Can you tell me what i'm doing wrong?
>
> here is the loading code:
>
> datascape.getAllAnchors = function(){
> $.get("projects/datascapes.xml",function(data){
> return $(data);
> });
>
> }
>
> then further down, i need to retrieve an item's parent  col element "title" 
> attribute.
>
> jQuery(function($){
>
> ...
>
> var thisDS = $('scape[title="'+UI.section+'"]', datascape.anchors);
> var dsAnchorVar = $('item[title="' + $proj + 
> '"]',thisDS).parents('col').attr('title');
> $.log("anchor "+$proj+"= "+ dsAnchorVar );
>
> });
>
> the console keeps on showing dsAnchorVar as "undefined"
>
> the xml file:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
>
> Thanks for any help,
>
> Alexandre


[jQuery] Re: UI draggable working but not without errors

2007-12-21 Thread David Decraene

I'm getting the same error...

On Dec 12, 7:30 pm, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
> I download the jquery-ui.min.js by just selecting the Draggable plugin
> which produced an 18K file.
> $('table.draggable').draggable();
> actually works just fine on my page. It even works in IE 6.
>
> BUT! I'm getting errors in Firebug and the Error Console. And on IE6 I'm
> getting some error warnings. When I load the page I first get this::
>
>"$.ui[w] has no properties"jquery-ui.min.js (line 8)
>
> (since it's minified it doesn't really make sense to show what's on line 8)
>
> When I start dragging the element I get another error::
>
>   "$(this.helper).outerWidth is not a function"   jquery-ui.min.js (line 23)
>
> I'm using jquery-1.2.1.min.js.
> The second error about outerWidth goes away when I also install dimensions.
>
> --
> Peter Bengtsson,
> workwww.fry-it.com
> homewww.peterbe.com
> hobbywww.issuetrackerproduct.com


[jQuery] Re: Looping ajax requests

2007-12-19 Thread David Decraene

the alerting is because of the asynchronous callback: it only triggers
success when it receives response from the server, and by that time i
already equals 5 (already looped multiple times), I think.
Why you do not get that last page beats me, try  for (var i=1;i<6;i+
+)

David Decraene
http://ontologyonline.org


On Dec 19, 8:42 am, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> I'd say its a scope issue with the var i
>
> I am not a JS expert so this is not definitive
>
> var I = 0, dt = 5;
>
> for (i=1;i<=dt;i++) {
> I = i;
> $.ajax({
>  type: "GET",
>  url: "http://example.com/5740/"+i+"/page.html";,
>  dataType: "text",
>  success: function(data){
>  alert(I);
>
> }
> })};
>
> untested; I might either be barking up the wrong tree or I may have
> misunderstood the quest
>
> or some other wiser jQuerian may have more to say, all part of the learning
> curve :)
>
> On 18/12/2007, Ryura <[EMAIL PROTECTED]> wrote:
>
>
>
> > Got a problem when looping ajax requests. I have probably made a
> > mistake somewhere but I can't find it.
>
> > dt=5;
> > for (i=1;i<=dt;i++) {
> > $.ajax({
> >   type: "GET",
> >   url: "http://example.com/5740/"+i+"/page.html";,
> >   dataType: "text",
> >   success: function(data){
> >   alert(i);
> > }
> > })};
> > This alerts "5" 4 times. Interestingly, it correctly gets 4 pages:
> >http://example.com/5740/1/page.html
> >http://example.com/5740/2/page.html
> >http://example.com/5740/3/page.html
> >http://example.com/5740/4/page.html
>
> > What is the solution?
> > Thanks,
> > Ryura


[jQuery] Re: General question regarding AJAX and callbacks

2007-12-13 Thread David Decraene


You could make a synchronous ajax call instead, but it will lock the
browser until a response is received:
something roughly along these lines:
$.ajax({
type: "GET",
url: "validate.php",
data: {value: somevalue}
async: false,
dataType: somedatatype,
success: function(data){...}
});

or maybe try and trigger a function if the data is considered valid
(and possibly another if invalid) that does what you want it to do
instead of return true or false.


[jQuery] Re: jQuery Magnifier for multiple divs

2007-12-10 Thread David Decraene

I think the problem might be the styling setting on the second div,
you are making a box of 150 * 150 (and therefore images are on two
lines). The images seem to enlarge if you hover a couple of pixels
below the image instead of on top of the image (perhaps corresponding
more to the middle of the div), there seems to be some miscalculation
by the plugin on where the image is.
Shouldn't really happen so is probably a glitch in the magnifier code.

On Dec 5, 7:35 pm, defender71 <[EMAIL PROTECTED]> wrote:
> I have changed the code to the one below, however the problem is still
> the same.  On their sample (http://ui.jquery.com)pagethey have
> multiple examples all in one page, but can't figure out how they are
> doing it.  I'm new to jQuery and so far I like it, but there is that
> learning curve that I have to take care of.
>
> Thanks for your help.
>
> 
> 
> 
>  
> 
>
> 
> /*Magnifier*/
> jQuery(document).ready(function(){
> $(".magnify").magnifier({
> overlap:true,
> magnification:2,
> zindex:'3',
> opacity:{min:'0.6', max:'1'},
> distance:'20',
> baseline:0,
>
> });
> });
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
>
> -Enrique-
>
> On Dec 5, 1:47 am, David Decraene <[EMAIL PROTECTED]> wrote:
>
> > I need to admit I am not familiar with themagnifiercode, but:
> > Why do you have two references to document.ready? I would try
> > combining them, might already solve some problems:
> >  jQuery(document).ready(function(){
> > $("#example").magnifier({
> > overlap:true,
> > magnification:2,
> > zindex:'3',
> > opacity:{min:'0.6', max:'1'},
> > distance:'20',
> > baseline:0,
> > });
> > $("#secondary").magnifier({
> > overlap:true,
> > magnification:2,
> > zindex:'3',
> > opacity:{min:'0.6', max:'1'},
> > distance:'20',
> > baseline:0,
> > });
>
> > });
>
> > seems like you use the same setting, why not use a class (magnify)
> > assign it to both divs, and trigger the function like this (only
> > once):
> > $('.magnify').magnifier.
>
> > On Dec 5, 4:17 am, defender71 <[EMAIL PROTECTED]> wrote:
>
> > > My apologies if this is posted twice.
>
> > > I'm having some problems using themagnifierui.  Everything seems to
> > > work for one div of images however if I add another div of images the
> > > script does not work as expected.  For the second div the image zooms
> > > in when the mouse is not even close to the image.  I have posted the
> > > sample code below
> > > and a link to the samplehttp://www.kikesweb.com/pos/magnifiertest.html
>
> > >http://www.kikesweb.com/pos/magnifiertest.html
>
> > > 
> > > 
> > > 
> > >  > > 
> > > 
> > > 
> > > 
> > > /*Magnifier*/
> > > jQuery(document).ready(function(){
> > > $("#example").magnifier({
> > > overlap:true,
> > > magnification:2,
> > > zindex:'3',
> > > opacity:{min:'0.6', max:'1'},
> > > distance:'20',
> > > baseline:0,
> > > });
>
> > > });
>
> > > 
>
> > > 
> > > jQuery(document).ready(function(){
> > > $("#secondary").magnifier({
> > > overlap:true,
> > > magnification:2,
> > > zindex:'3',
> > > opacity:{min:'0.6', max:'1'},
> > > distance:'20',
> > > baseline:0,
> > > });});
>
> > > 
> > > 
> > > 
> > > 
> > >  images/mustang.jpg
> > >  images/camaro.jpg
> > >  images/plants.jpg
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >  images/mustang.jpg
> > >  images/camaro.jpg
> > >  images/plants.jpg
> > > 
> > > 
>
> > > 
> > > 
> > > -Enrique-


[jQuery] Re: jQuery Magnifier for multiple divs

2007-12-05 Thread David Decraene

I need to admit I am not familiar with the magnifier code, but:
Why do you have two references to document.ready? I would try
combining them, might already solve some problems:
 jQuery(document).ready(function(){
$("#example").magnifier({
overlap:true,
magnification:2,
zindex:'3',
opacity:{min:'0.6', max:'1'},
distance:'20',
baseline:0,
});
$("#secondary").magnifier({
overlap:true,
magnification:2,
zindex:'3',
opacity:{min:'0.6', max:'1'},
distance:'20',
baseline:0,
});

});

seems like you use the same setting, why not use a class (magnify)
assign it to both divs, and trigger the function like this (only
once):
$('.magnify').magnifier.

On Dec 5, 4:17 am, defender71 <[EMAIL PROTECTED]> wrote:
> My apologies if this is posted twice.
>
> I'm having some problems using the magnifier ui.  Everything seems to
> work for one div of images however if I add another div of images the
> script does not work as expected.  For the second div the image zooms
> in when the mouse is not even close to the image.  I have posted the
> sample code below
> and a link to the samplehttp://www.kikesweb.com/pos/magnifiertest.html
>
> http://www.kikesweb.com/pos/magnifiertest.html
>
> 
> 
> 
>  
> 
> 
> 
> /*Magnifier*/
> jQuery(document).ready(function(){
> $("#example").magnifier({
> overlap:true,
> magnification:2,
> zindex:'3',
> opacity:{min:'0.6', max:'1'},
> distance:'20',
> baseline:0,
> });
>
> });
>
> 
>
> 
> jQuery(document).ready(function(){
> $("#secondary").magnifier({
> overlap:true,
> magnification:2,
> zindex:'3',
> opacity:{min:'0.6', max:'1'},
> distance:'20',
> baseline:0,
> });});
>
> 
> 
> 
> 
>  images/mustang.jpg
>  images/camaro.jpg
>  images/plants.jpg
> 
> 
> 
> 
> 
> 
>  images/mustang.jpg
>  images/camaro.jpg
>  images/plants.jpg
> 
> 
>
> 
> 
> -Enrique-