[jQuery] Re: Half star rating plugin won't work with jQuery 1.2.3

2008-03-03 Thread Karl Swedberg



On Feb 29, 2008, at 1:16 PM, AsymF wrote:


I got this one to work:
Star Rating Plugin v1.1 -> http://www.fyneworks.com/jquery/star- 
rating/


But the half star plugin won't work with 1.2.3:
http://www.learningjquery.com/2007/05/half-star-rating-plugin

Does anyone know a fix? The stars all appear grayed out and hover also
doesn't work.


Hi there,

check it out here:

http://examples.learningjquery.com/rating/

It appears to be working with jQuery 1.2.3 just fine.

Just to give credit where it's due, Ritesh Agrawal wrote the plugin. I  
just made it work with 1/2 increments because someone asked for that.


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com


[jQuery] Re: Can I use jQuery to superimpose one image over part of another?

2008-03-03 Thread Karl Swedberg


Hi Dave,

You could easily make this happen with CSS alone, or am I missing  
something?


#imageDisplay {
position: relative;
width: 200px;
overflow: hidden;
}

#image3 {  /* give it whatever id you want */
position: absolute;
left: 100px;
}


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 3, 2008, at 4:44 PM, [EMAIL PROTECTED] wrote:



Hi,

Let's say I have this HTML


   
   


and then I have another image, "image3.gif".  I would like to layer
image3.gif 100 pixels from the left most coordinate of "image1.gif" so
that it appears on top of the other two images.  The parent DIV,
"imageDisplay", is relatively positioned.  Is there a way, using
jQuery, to do what I'm asking that works in both IE and Firefox, don't
care about the other browsers for now.

Thanks, - Dave




[jQuery] Re: Function overriding

2008-03-03 Thread howa



On 3月4日, 上午12時37分, David Stamm <[EMAIL PROTECTED]> wrote:
> I'm sorry, I thought you were trying to architect your own plugin to
> make it easier to override for others.
>
> A useful technique when you're overriding someone else's function, is
> to save a reference to the original implementation right before you
> override it:
>
> // save a reference to the original function
> fn = jQuery.example;
>
> // override function
> jQuery.example = function(str) {
> // use the original implementation
> fn(str.toUpperCase());
> };
>
> This doesn't really help in your example, since you're trying to
> override a call to alert().  But I thought I'd mention it, in case it
> does applies to your real-world situation.
>
> thanks,
> David
>
>

Thanks for your tips.

Howard


[jQuery] Re: jQuery on Mozilla rhino

2008-03-03 Thread howa



On 3月4日, 上午7時27分, "John Resig" <[EMAIL PROTECTED]> wrote:
> Sounds like you're using an old version of Rhino.
>
> --John

Hi John,

I am using the latest one: rhino1_6R7

I can run successfully according to your post, I just can't read the
JavaScript file (env.js) by using Java!

I will dig into the code to see what are the difference between load()
in the js.jar and engine.eval(...) in Java.

Thanks!

Howard



[jQuery] Re: techniques for displaying line numbers

2008-03-03 Thread rolfsf


In looking for ideas, I discovered the 
http://plugins.jquery.com/project/designMode designMode plugin , which
facilitates cross browser use of the designMode feature. Using this
approach, I loaded a page with simple ordered list into an iframe. With
designMode turned on, I can add lines and line items. 

It's not exactly what I was looking for, but it's a step in that direction.
I would love to hear other ideas!

r.


rolfsf wrote:
> 
> I'm trying to sketch out a concept for an application that is essentially
> a simple text editor or equation editor. A user will type or paste some
> text ( a calculation of sorts) into a text area.
> 
> Is there a way, perhaps using jquery, to display the line numbers along
> side the text or text-area? Is there a way to render the text area as an
> ordered list on the fly, while still allowing editing?
> 
> Just looking for ideas from anyone who may have encountered this
> 
> thanks
> Rolf
> 

-- 
View this message in context: 
http://www.nabble.com/techniques-for-displaying-line-numbers-tp15812042s27240p15818436.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: adding a loading image to a mouse pointer

2008-03-03 Thread Karl Swedberg


Hi there,

Do you want the loading image to follow the mouse as the mouse moves?  
if so, you can set its top and left css properties on mousemove.  
Something like this:


$('body').mousemove(function(event) {
  $('#loading-image').css({
top: (event.pageY + 10) + 'px',
left: (event.pageX + 10) + 'px'
  });
});

You might need to look into ways to avoid CPU spikes because the  
mousemove event can be processor-intensive. But this is a good start.


Oh, one more thing: make sure that loading image is set to position:  
absolute; in the stylesheet, so that it can freely move around.



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 3, 2008, at 9:32 AM, ryszard99 wrote:



hi there,

i've just started doing jquery stuff and am interested in how i can
add a loading image that will follow the mouse pointer, pretty much
exactly how cluetip does it.  actually i'm using cluetip in my site
and would like to replicate the loading image functionality..

if someone could point a n00b in the right direction i'd appreciate
it.

regs
.r99




[jQuery] Re: jQuery & Firefox bug.

2008-03-03 Thread Mario

Hi!

What do you mean? I didn't understand!

OutSystems corporate
site

Cheers,
Mário

On Feb 22, 10:14 pm, ruizbennett <[EMAIL PROTECTED]> wrote:
> If you remove the href (which has the postback), it will work in
> firefox.


[jQuery] Re: ANNOUNCE: No Spam plugin

2008-03-03 Thread Bill

Hi  Mike

On Jan 23, 9:39 am, Mike Branski <[EMAIL PROTECTED]> wrote:
> This jQuery plugin turns an obfuscated e-mail address into a human-
> readable one. It's lightweight and accepts multiple filtering levels
> for additional security.

Thanks for the plugin.  Works great for me!

I did run into a problem with email addresses that have more than one
dot (period) in them.  For example, my/name/my/domain/com gets
rendered as [EMAIL PROTECTED] when it should be
[EMAIL PROTECTED]

I made a small change in the encoding convention by using a double
slash (//) to represent the @.  Single slashes (/) represent the
dots.  So my example is now encoded as my/name//my/domain/com.

Another thing that I noticed is if there are several single slashes in
the obfuscated email address, only the first one gets substituted with
a dot because the replace() function is not executing globally.

So to put this together, I changed the common code sequence:
.replace('/', '@').replace('/', '.')
to:
.replace('//', '@').replace(/\//g, '.')

This replaces the singly occurring double slash with an @, then
replaces all single slashes with a dot.

Cheers,
Bill


I


[jQuery] Re: Using jQuery without ready()

2008-03-03 Thread Hamish Campbell

In that limited case, I supposed you don't 100% have to, but it's
still a **really** good idea.

First of all, you want your page to load before executing scripts.
There is nothing worse that JS failing half way through a page load,
it's faster to execute jQuery after the DOM has loaded, you can put
all your JS in one place and it's better coding style.

I guess the question is: what are you trying to gain by NOT wrapping
it in document.ready?

On Mar 4, 11:02 am, fetis <[EMAIL PROTECTED]> wrote:
> On Mar 3, 6:20 am, Hamish Campbell <[EMAIL PROTECTED]> wrote:
>
> >http://docs.jquery.com/How_jQuery_Works#Launching_Code_on_Document_Ready
>
> But I'm not needed in code that running after page loaded. I just want
> to add some class (for example) to already loaded element. Have I wrap
> it into ready() event?


[jQuery] Re: jQuery on Mozilla rhino

2008-03-03 Thread John Resig

Sounds like you're using an old version of Rhino.

--John

On Mon, Mar 3, 2008 at 6:16 AM, howa <[EMAIL PROTECTED]> wrote:
>
>  Hello,
>
>  Anyone tried to run jQuery on rhino?
>
>  I followed John's post, it was okay.
>
>  However, if I code in Java (since I don't use command line), the
>  env.js cannot be interpreted:
>
>  E.g.
>
>  engine.eval(new FileReader("C:/env.js"));
>
>  It gives:
>
>  javax.script.ScriptException:
>  sun.org.mozilla.javascript.internal.EvaluatorException: missing :
>  after property id (#15) in  at line
>  number 15
> at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
> at javax.script.AbstractScriptEngine.eval(Unknown Source)
> at Test.main(Test.java:33)
>
>  Where line15 is:
>
> get userAgent(){
>
>
>  a little bit strange...
>
>  Any idea?
>
>  Thanks.
>
>


[jQuery] Re: IE7 Flicker On DIV slideUp()

2008-03-03 Thread Josh Nathanson


I wonder if this could be logged as a bug.  I glanced at the jQuery source 
for animate, but it's difficult to figure out exactly where the problem is 
through all the abstraction.


Several people have noticed this behavior in IE, but so far nobody has been 
able to come up with a definitive solution AFAIK.


-- Josh

- Original Message - 
From: "alphadog" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Monday, March 03, 2008 12:56 PM
Subject: [jQuery] IE7 Flicker On DIV slideUp()





So, I have an issue that I have seen mentioned in other posts but no
solutions work for me for some reason where in FF, slideUp() works
fine, but in IE7, it flickers at the end of the slide. I am using
jquery-1.2.3.pack.js and the DOCTYPE is set to strict ("-//W3C//DTD
XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
strict.dtd"). I'm not sure how to fix this? (using hide() causes no
flicker, but I'd like to keep the slide.)

Here's the code:


 


var doUp = true;
$(document).ready(function(){
$("#TogglePaneHeader").click(function(){
if (doUp) {
$("#PaneHeaderButton").attr("src", "/wvo_dev/images/plus.gif");
$("#TogglePaneContent").slideUp("fast");
doUp = false;
}
else {
$("#PaneHeaderButton").attr("src", "/wvo_dev/images/minus.gif");
$("#TogglePaneContent").slideDown("fast");
doUp = true;
}
});
});

   
.paneHeader {
background-color:#1b7433;
font: bold 13px Arial, Helvetica, sans-serif;
color: white;
display: block;
position: relative; /*To help in the anchoring of the ".statusicon"
icon image*/
width: auto;
padding: 4px 0;
padding-left: 10px;
text-decoration: none;
}

   
 FILTER:

   Your content goes here.
   
   
   RESULTS:
 


Some additional layout CSS:
#frameBody {
position: fixed;
top: 51px;
left: 151px;
right: 0;
bottom: 31px;
overflow: auto;
background: #fff;
}

#frameBodyContent {
margin: 5px;
margin-left: 10px;
border:dotted 1px white;
}

* html body { /*IE hack*/
padding: 55px 0 30px 150px;
}

* html #frameBody { /*IE hack*/
height: 100%;
width: 100%;
} 




[jQuery] Re: Using jQuery without ready()

2008-03-03 Thread Jeffrey Kretz

If you put the jquery reference in the  and your script after the
close of the  tag, you don't need to use a $(document).ready.

The funny thing is, that's exactly the behavior that $(document).ready is
designed to simulate.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of fetis
Sent: Monday, March 03, 2008 1:55 PM
To: jQuery (English)
Subject: [jQuery] Re: Using jQuery without ready()


On Mar 3, 5:24 am, the_woodsman <[EMAIL PROTECTED]> wrote:
> To my knowledge, the main motivation for using ready and similar is
> that otherwise, you have to pay close attention to where your scripts
> are included in your page to ensure everything that the script relies
> on has already been added to that page.
> For example, if your script affects all .someClass elements, but not
> all of them have been added to the document before your script file
> was included, then the ones that came after the script block/include
> will be missed out.
>
Yes, I know about possible problems if some part of page is not
loaded.
I'm speaking about case when all HTML elements are loaded before
script running.
Have this scheme some hidden problems?



[jQuery] Re: why jQuery?

2008-03-03 Thread Rey Bango


Zok,

Quite a bit of work has been done in having jQuery and Rails work 
together. If you search the list archives, you can find out morw.


Rey...

zok wrote:

Hey,

thanks for your answers.
Doesn't jQuery work with Rails? Cause I think jQuery is more flexible
and has the simler code. Right?

Thanks
zok

On 3 Mrz., 05:02, Shawn <[EMAIL PROTECTED]> wrote:

First, I think that only YOU can make that choice for yourself.  Each
developer has their own techniques/styles.  We can't make judgements to
match your environment or habits :)

Next, I think both have a future because they serve slightly different
needs and audiences. (IMO).  jQuery seems to me to more useful for a web
developer or those building the not so simple interfaces.
Prototype/scriptaculous seems to be better for those who either a) use
Rails (this is changing though), b) look for the cut/paste solutions, or
c) don't need to go beyond the "simple" tasks.  (i.e. web and graphic
designers with little JS experience)

Now, that above is kind of a loaded statement and I expect lots of
rebuttals... :)  But that's the way I see it.  To be fair though
Prototype on it's own *could* be used for more, but for me at least it
gets in the way more often than not, though I haven't used it for bout a
year now...

My random (and suspect) thoughts

Shawn

zok wrote:

Hey,
what is going to have the best future: jQuery or Prototype
(scriptaculous)?
Maybe you can tell me a few differences and/or reasons for your
joice...
Regards,
zok




[jQuery] Re: why jQuery?

2008-03-03 Thread Jeffrey Kretz
Exactly, javascript runs on the client's browser.  Ruby, PHP, ASP.NET etc.
etc. all run on the server.  There should be no conflict.

JK

 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Ray
Sent: Monday, March 03, 2008 1:05 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: why jQuery?

 

jQuery should work with ANY back end language, since it is a font end
language.

On Mon, Mar 3, 2008 at 12:52 PM, zok <[EMAIL PROTECTED]> wrote:


Hey,

thanks for your answers.
Doesn't jQuery work with Rails? Cause I think jQuery is more flexible
and has the simler code. Right?

Thanks
zok


On 3 Mrz., 05:02, Shawn <[EMAIL PROTECTED]> wrote:
> First, I think that only YOU can make that choice for yourself.  Each
> developer has their own techniques/styles.  We can't make judgements to
> match your environment or habits :)
>
> Next, I think both have a future because they serve slightly different
> needs and audiences. (IMO).  jQuery seems to me to more useful for a web
> developer or those building the not so simple interfaces.
> Prototype/scriptaculous seems to be better for those who either a) use
> Rails (this is changing though), b) look for the cut/paste solutions, or
> c) don't need to go beyond the "simple" tasks.  (i.e. web and graphic
> designers with little JS experience)
>
> Now, that above is kind of a loaded statement and I expect lots of
> rebuttals... :)  But that's the way I see it.  To be fair though
> Prototype on it's own *could* be used for more, but for me at least it
> gets in the way more often than not, though I haven't used it for bout a
> year now...
>
> My random (and suspect) thoughts
>
> Shawn
>
> zok wrote:
> > Hey,
>
> > what is going to have the best future: jQuery or Prototype
> > (scriptaculous)?
> > Maybe you can tell me a few differences and/or reasons for your
> > joice...
>
> > Regards,
> > zok

 



[jQuery] Re: Event Bubbling - Not!

2008-03-03 Thread Benjamin Sterling
skube, try *mouseleave*  instead, that one take bubbling into account.

On 3/3/08, skube <[EMAIL PROTECTED]> wrote:
>
>
> I am a little confused about event bubbling. Say for example I have
> the following bit of HTML:
>
> 
> 
> 
> one
> 
> 
> two
> 
> 
> 
>
> when I try:
> 
> $("#main").mouseout(function() {
> alert('test');
> });
> 
>
> The alert gets fired even when mousing in/out of divs one/two, but
> while still staying within the main div.
>
> How do I fire the alert only if I mouseout of everything (including
> main), not just out of one and into two?
>



-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com


[jQuery] Event Bubbling - Not!

2008-03-03 Thread skube

I am a little confused about event bubbling. Say for example I have
the following bit of HTML:




one


two




when I try:

$("#main").mouseout(function() {
alert('test');
});


The alert gets fired even when mousing in/out of divs one/two, but
while still staying within the main div.

How do I fire the alert only if I mouseout of everything (including
main), not just out of one and into two?


[jQuery] Re: Using jQuery without ready()

2008-03-03 Thread fetis

On Mar 3, 6:20 am, Hamish Campbell <[EMAIL PROTECTED]> wrote:
> http://docs.jquery.com/How_jQuery_Works#Launching_Code_on_Document_Ready

But I'm not needed in code that running after page loaded. I just want
to add some class (for example) to already loaded element. Have I wrap
it into ready() event?


[jQuery] Re: Using jQuery without ready()

2008-03-03 Thread fetis

On Mar 3, 5:24 am, the_woodsman <[EMAIL PROTECTED]> wrote:
> To my knowledge, the main motivation for using ready and similar is
> that otherwise, you have to pay close attention to where your scripts
> are included in your page to ensure everything that the script relies
> on has already been added to that page.
> For example, if your script affects all .someClass elements, but not
> all of them have been added to the document before your script file
> was included, then the ones that came after the script block/include
> will be missed out.
>
Yes, I know about possible problems if some part of page is not
loaded.
I'm speaking about case when all HTML elements are loaded before
script running.
Have this scheme some hidden problems?


[jQuery] Re: assign to outerhtml

2008-03-03 Thread Jeffrey Kretz

I had to do something similar, and this is how I solved it.

$.ajax({url:'blabla',success:process});

function process(results)
{
var id = 'therowid';
var origRow = $('#'+id);
var newRow = $(results).insertAfter(origRow);
origRow.remove();
newRow.attr('id',id);
}

So long as "results" was a string of properly formed TR html, this would
insert a new row after the current one, then remove the current one.

Of course, this would only work if you don't have a bunch events wired up
the row or its children.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pihentagy
Sent: Monday, March 03, 2008 1:41 PM
To: jQuery (English)
Subject: [jQuery] assign to outerhtml


Hi all!

I'd like to update a tr tag of a table with an ajax call.
The problem is that outerhtml is an IE specific attribute, and I have
the row style defined in the tr tag.
Is there a cross-browser solution to update a single row of a table
either with some cross-browser outerhtml script or without using
outerhtml?
So here just getting the outerhtml is not enough, I'd like to use it
as an lvalue.

Since I'm a beginner in jquery, can I have a minimal but complete
example? (I have some difficulties with the ajax functions)

thanks
Gergo



[jQuery] Can I use jQuery to superimpose one image over part of another?

2008-03-03 Thread [EMAIL PROTECTED]

Hi,

Let's say I have this HTML






and then I have another image, "image3.gif".  I would like to layer
image3.gif 100 pixels from the left most coordinate of "image1.gif" so
that it appears on top of the other two images.  The parent DIV,
"imageDisplay", is relatively positioned.  Is there a way, using
jQuery, to do what I'm asking that works in both IE and Firefox, don't
care about the other browsers for now.

Thanks, - Dave


[jQuery] assign to outerhtml

2008-03-03 Thread pihentagy

Hi all!

I'd like to update a tr tag of a table with an ajax call.
The problem is that outerhtml is an IE specific attribute, and I have
the row style defined in the tr tag.
Is there a cross-browser solution to update a single row of a table
either with some cross-browser outerhtml script or without using
outerhtml?
So here just getting the outerhtml is not enough, I'd like to use it
as an lvalue.

Since I'm a beginner in jquery, can I have a minimal but complete
example? (I have some difficulties with the ajax functions)

thanks
Gergo


[jQuery] Re: How do I make an inline anchor link slowly scroll down?

2008-03-03 Thread Ariel Flesler

Olaf ? What the... ???

Now you are not including jQuery.ScrollTo... how do you expect it to
work ?
Add the plugin and it works...

Cheers
Ariel Flesler


On 3 mar, 15:52, "Michael Ray" <[EMAIL PROTECTED]> wrote:
> Thank Olaf for finding that spelling error!
>
> Ok, so I fixed that spelling error (what a shameful mistake i know), but it
> still does not want to work! I have simplified the code even further to just
> affect all inline links on the page:
>
> Here is the code
>
> 
>   $(document).ready(function(){
>     $.localScroll();
>   });
> 
>
> and here is the html
>
> THIS IS A TEST
> ...
> ...
> ...
> This is where it should go
>
> here is the page.
>
> http://66.199.224.168/calendar
>
> This seriously boggles my mind.
>
> -Mike R
>
>
>
> On Mon, Mar 3, 2008 at 6:41 AM, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
> > Ohhh man... I got crazy, mumbling to myself "what the heck!".
> > After 10 minutes of going thru pretty much everything, I realized you
> > wrote:
> > 

[jQuery] Re: Can't get started on Getting Started :)

2008-03-03 Thread Jeffrey Kretz

For what it's worth, I copied and pasted your HTML code and tested it on my
computer and it worked.

There were two changes I had to make.

1.  There are some odd line-breaks in your html below.  Maybe they were
added by your e-mail client, but I had to make 



into one line,  and  as well.

I also removed the 
 tags, though again, perhaps those were added by
your mail client.

Lastly, the path to jquery.js was different in my test environment.

Assuming the line breaks aren't the cause, ensure you have a correct path to
your jquery script file.  Because basically, the code you wrote worked fine
on my machine.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of kenny
Sent: Monday, March 03, 2008 12:14 PM
To: jQuery (English)
Subject: [jQuery] Can't get started on Getting Started :)


Disclaimer: Complete jQuery/JavaScript noob here, but heavily
experienced developer overall. (And I have been googling around
finding similar questions, but nothing from those exchanges can get
this basic hello-world example working.)

Platform: FireFox 2.0.0.12 on Windows XP

Here is what I had after the first suggested enhancement, namely
adding an alert on a click: