[jQuery] Re: Avoiding invalid markup

2007-08-19 Thread Wizzud


Surround inline script with commented out , eg:

//



Kyle-47 wrote:
> 
> 
> Code should read:
> 
> $(this).hide().parent().prepend(" ajax-
loader.gif ");
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Avoiding-invalid-markup-tf4292315s15494.html#a12220049
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: AJAX and jQuery-Partail Data retrieval

2007-08-19 Thread Outlines

Extremely Sorry,

Just found out there was a bug in string replace in php. Cause
termination of the page

Thanks



[jQuery] Re: ASP.NET IDs

2007-08-19 Thread Sam Collett

I use $("[EMAIL PROTECTED]"]) to get any input elements whose id ends
with MyID (i.e. whatever you set in your ASPX page). Either that, or
use a class instead.

As for the 2nd question, I don't use anything other than the basic
controls (repeater, dropdownlist etc - DataGrid's and GridViews I
don't use) as it helps keep the HTML clean. It also means that any
code I write will be pretty portable (i.e. very little modification
needed to get it to work with PHP, JSP, CFML etc).

On Aug 18, 9:29 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I have two small questions, if anybody can help:
>
> 1. This was recently published concerning .NET:
>
> "if you have an element that has runat="server" attribute you cannot
> call it directly as #loginForm  because asp.net rewrites the id to
> something different  just doa view source on your aspx page and you
> will see the renamed form cleintid "
>
> I was wondering how to probably implement jQuery with an ASP.NET
> control considering this problem.  Or do we simply need to write out:
>
> "ctl00_ContentPlaceHolder1_btnConfirm" to access the btnConfirm
> button?
>
> 2) I'm also using AJAX update panel to update a gridview.  Everything
> is working great.  However, once I update the gridview and it's
> refreshed in AJAX, my jQuery no longer works, even though the code is
> there.
>
> Has anybody had any experience with this?  Thanks for the help!



[jQuery] A Simple Question ! (mouseover)

2007-08-19 Thread Kixe








$(document).ready(function() {

   $("img").mouseover(function(){
  $("span").html("");
});

  $("span").mouseout(function(){
   $(this).html("");
});

});

Mouse point to IMG1, all of it hover,
How can I piont to IMG1, IMG1 hover, and IMG2 , IMG2 hover only .



[jQuery] Re: problem looping through table rows in IE

2007-08-19 Thread Olaf Bosch


Potluri schrieb:


Thats really surprising, the same code doesn't work for me but works for you.
No I dont have IE in quirks mode. Does that make a difference?


No, i tested this, works in Quirks to.

See this, works this for you?
http://olaf-bosch.de/bugs/jquery/potluri.html

Other idea, is your Table-HTML invalid?

--
Viele Grüße, Olaf

---
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
---


[jQuery] Re: ASP.NET IDs

2007-08-19 Thread Armand Datema

@Sam

I always use this as well but maybe a trick for you ineed a bit more
design freedom over every piece of repeated data

In my repeater item template I always include a multiview control with
several views.

This way on databound of the repeater i can determine which view of
the multiview to use for each repeater item. But still keep the code
as clean  as possible. But with more options than itemtemplate and
alternating item template

Armand

On 8/19/07, Sam Collett <[EMAIL PROTECTED]> wrote:
>
> I use $("[EMAIL PROTECTED]"]) to get any input elements whose id ends
> with MyID (i.e. whatever you set in your ASPX page). Either that, or
> use a class instead.
>
> As for the 2nd question, I don't use anything other than the basic
> controls (repeater, dropdownlist etc - DataGrid's and GridViews I
> don't use) as it helps keep the HTML clean. It also means that any
> code I write will be pretty portable (i.e. very little modification
> needed to get it to work with PHP, JSP, CFML etc).
>
> On Aug 18, 9:29 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > I have two small questions, if anybody can help:
> >
> > 1. This was recently published concerning .NET:
> >
> > "if you have an element that has runat="server" attribute you cannot
> > call it directly as #loginForm  because asp.net rewrites the id to
> > something different  just doa view source on your aspx page and you
> > will see the renamed form cleintid "
> >
> > I was wondering how to probably implement jQuery with an ASP.NET
> > control considering this problem.  Or do we simply need to write out:
> >
> > "ctl00_ContentPlaceHolder1_btnConfirm" to access the btnConfirm
> > button?
> >
> > 2) I'm also using AJAX update panel to update a gridview.  Everything
> > is working great.  However, once I update the gridview and it's
> > refreshed in AJAX, my jQuery no longer works, even though the code is
> > there.
> >
> > Has anybody had any experience with this?  Thanks for the help!
>
>


-- 
Armand Datema
CTO SchwingSoft


[jQuery] Re: ASP.NET IDs

2007-08-19 Thread Stephan Beal

On Aug 18, 10:29 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> 2) I'm also using AJAX update panel to update a gridview.  Everything
> is working great.  However, once I update the gridview and it's
> refreshed in AJAX, my jQuery no longer works, even though the code is
> there.

This sounds like one of the FAQ questions:

http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F



[jQuery] Re: Avoiding invalid markup

2007-08-19 Thread Stephan Beal

On Aug 19, 5:55 am, Kyle <[EMAIL PROTECTED]> wrote:
> $(this).hide().parent().prepend("
> >");
>
> This, obviously, is in the head tag. However, when I run it through
> the validator, it is returning an error:
...
> I want to avoid invalid markup; how can I get around this?

In what context are you using $(this)? If $(this) resolves to the HEAD
then parent() will resolve (i believe) to the HTML node, to which you
are prepending an IMG, which of course is illegal. The way to avoid
that is to use a legal path to the element which you want to add the
IMG to.

Without seeing your code i can't say much more than that.

:?



[jQuery] Strange bug with slide function and input elements

2007-08-19 Thread Jeroen Coumans

Hi,

I've got a simple list of radio buttons that I want to turn into an
accordion, have a look at . Note that without the input elements, the sliding up
and down works perfectly, but with the input elements, the sliding up
occurs twice. This happens in Firefox and IE7, but not in Safari 2.x
or IE6. Anybody got a clue what's going on?

Thanks,
Jeroen Coumans



[jQuery] Re: Proper use of the hoverIntent plug-in?

2007-08-19 Thread Bernd Matzner

Hi Spencer,

first of all let me ask you why you would want to use the hoverIntent
plugin for this particular use case. After all, the Hours and Location
buttons are clearly separated, so I don't see how a user could
accidentally open one of the menus. At least you should lower the
timeout, so that it doesn't take forever for the menu to open. As a
user who doesn't know about the hidden menu, I'd simply click and
wonder why nothing happens.

Besides that, I assume the problem is that your menu isn't nested
within the btn_hours div. So when the menu opens and you mouseover the
menu, a mouseout event is fired on the btn_hours div and another
mouseover event is fired on the menu-hours-down div. So after the
timeout, the menu closes again, but the other mouseover causes the
menu to be displayed again, which causes the appearing and
disappearing menu.

Try nesting like this:


   ...
   
   ...
   



and use only the btn_hours selector

$("#btn_hours").hoverIntent({ ... });


> Also, can a hoverIntent event along with a click event be applied to
> the same element?  

Sure!

$("#btn_hours").hoverIntent({ ... }).click(...);

However, the hoverIntent would still be in effect if a user clicks. If
you just use show(), the user wouldn't see that after clicking and
opening the menu, the hoverIntent function tries to open is again, as
the menu is already visible. But if you used some animation, it would
be run twice. So you might want to intercept that action if either
event (hover or click) has already performed the task, either by
adding some if clause or by using unbind().

> but from time to time I move the
> mouse over the drop down and it will collapse or collapse and reopen
> rapidly.  

This is the same problem as described above.

> I've
> upped the z-index on the customer quotes elements and still can't get
> it to work properly.  What am I missing? (I'm sure it's probably right
> in front of my face)

Try adding z-index to the "quote-pull-box" div instead. That should
affect the entire div.
Again, bind the hoverIntent only to one element, in your case "quote-
pull-box", which is the parent of all elements within that div.
I don't see why you have another  around that div when
the css of quote-pull-box defines the same values again.

You seem to be using both tables and divs in the layout. That makes it
hard to read the source code and even harder to change things around.
You might want to try switch to css-based layout completely. As soon
as you clean up things there I'm sure you'll run into less trouble
with css-p elements.

Hope that helps,
Bernd



>
> I would really appreciate any help someone can provide, I've almost
> given up trying to get this issues resolved.
>
> Thank you in advance.



[jQuery] Re: .load path problems

2007-08-19 Thread Pops

On Aug 18, 5:32 am, shakerman <[EMAIL PROTECTED]> wrote:
>
> I've tried adjusting the path, i.e.
>
> $("#myContent").load("../mypage.php");
> $("#myContent").load("/mypage.php");
>
> etc, but consistently receive the same error message. Does anyone know
> how I can resolve this?

Hi Shakerman,

If you tried fully qualified URLs (e.g.,. "/mypage.php") and that
didn't work, then that somewhat leans to your server-side scripts
needing more information on the server-side path resolution.

I came across similar issues.

In most cases, using FQ urls on the client side resolved it.  In
another case, as a temporary solution until I logistical requrements
of using jQuery on our system, I had to copy files to sub-folders,
i.e, like wait.gif.  This would require a change to the plugin I was
using to make it more generic.

If you haven't yet, if you are using FF, install FireBug Debugger.  It
has a display option to show you all HTTP request made and whether it
failed or not.This helped in quckly seeing why some request were
not showing up.

---
HLS



[jQuery] Re: Documentation Nit: .load - Incorrect Info regarding how data is sent

2007-08-19 Thread Pops


On Aug 18, 9:29 pm, "John Resig" <[EMAIL PROTECTED]> wrote:

> Feel free to file a bug on it in the tracker, as an 
> enhancement:http://dev.jquery.com/

Done:

Ticket #1516 (new enhancement)
.load - add support for standard key/value pairs string as a parameter

Question:

Can you give me a quick example of a jQuery function override?  Not a
new function plugin.  For example, using a simple plugin example given
to me, as use it as a model to override jQuery.param() like so:

(function($) {
  var _param = $.fn.param;
  $.fn.param = function(a) {
  if (a.constructor == String) {
  return a;
  }
  return _param.apply(this, arguments);  // ?? Inheritance?
  };
})(jQuery);

Thanks

--
HLS



[jQuery] Re: Avoiding invalid markup

2007-08-19 Thread bleen

Are you saying that the markup (as it downloads form the server
(including your JS above)) is not validating? Or your markup AFTER the
JS has made its changes is not validating? I'm guessing its the
former. If it is, try putting all your JS in an html comment tag. like
this:





[jQuery] Re: problem looping through table rows in IE

2007-08-19 Thread Potluri


Thanks Olaf,
 I appreciate your help.  Yeah, might be my table is not valid. I'll check
on it. Thats the only reason I can see now. But whats strange is I'm using
table sorter plugin on the same table which uses same selector to select
rows, it works on bith IE and firefox but that's not working for my stuff.
Do you have any idea, if it breaking it should break for sorting too right
if my table is invalid?.   But that selector works for sorting plugin. Pleas
let me know if you have some idea why it's happening like this. 

Potluri wrote:
> 
> Hi every one,
>  Please help me out in solving this problem. I face this only in
> IE, I've table with id="srTable", so I'm looping through the table rows
> using selector $("> tbody:first/tr","#srTable") .each(function(){}); , the
> table has only one tbody with multiple rows in it. 
> Please post reply only if you have straight answers for this problem. 
> Thanks,  
> Vijay
> 

-- 
View this message in context: 
http://www.nabble.com/problem-looping-through-table-rows-in-IE-tf4287894s15494.html#a1951
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: How to check multiple checkboxes checked at a time

2007-08-19 Thread Potluri


Thanks a lot for your suggestion. Its really awesome.

George-107 wrote:
> 
> 
> I dare say someone can offer a better solution for your first request:
> To know whether all checkboxes are checked. I'd probably try !$
> ("#id1,#id2,#id3").is(":not(:checked)") which returns true if all are
> unchecked (Note the ! at the beginning).
> 
> Your second request is easy: To know whether at least one is checked
> use $("#id1,#id2,#id3").is(":checked") which returns true if any are
> checked..
> 
> George
> 
> On Aug 18, 9:28 pm, Potluri <[EMAIL PROTECTED]> wrote:
>> Hi,
>>   Is there a way to check a multiple check boxes checked at a time like.
>> 
>> 
>> 
>> 
>>
>> Is there  a way to check like $("#id1,#id2,#id3").attr("checked"); should
>> return true if all of them is checked.
>>
>> and also is there a way to return true if atleast one of them is checked
>> like $("#id1||#id2||#id3").attr("checked"); should return true if atleast
>> one id is checked.
>>
>> I'm waiting for staright response.
>>
>> Thanks in advance.
>>
>> --
>> View this message in
>> context:http://www.nabble.com/How-to-check-multiple-checkboxes-checked-at-a-t...
>> Sent from the JQuery mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-check-multiple-checkboxes-checked-at-a-time-tf4268943s15494.html#a1957
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Documentation Nit: .load - Incorrect Info regarding how data is sent

2007-08-19 Thread Pops



On Aug 19, 9:54 am, Pops <[EMAIL PROTECTED]> wrote:

> Question:
>
> Can you give me a quick example of a jQuery function override?  Not a
> new function plugin.  For example, using a simple plugin example given
> to me, as use it as a model to override jQuery.param() like so:
>
> (function($) {
>   var _param = $.fn.param;
>   $.fn.param = function(a) {
>   if (a.constructor == String) {
>   return a;
>   }
>   return _param.apply(this, arguments);  // ?? Inheritance?
>   };
>
> })(jQuery);
>
> Thanks

Figured it out:

(function($) {
  var _inherit = $.param;
  $.param = function(a) { return (a.constructor == String)?
a:_inherit(a); };
})(jQuery);

This works perfectly for supporting string KV pairs parameters while
keeping with backward support for Object or Array parameters.

string:  $('#containerId').load(url,"p1=v1&p2=v2.&pn=vn");
JSON:  $('#containerId').load(url,{p1:'v1', p2:'v2' ,pn:'vn'});

Thanks

---
HLS




[jQuery] New jQuery.param() plugin (override) : Adds url Key=Value Parameter String Support

2007-08-19 Thread Pops

My first plugin, simple, but may provide some usefulness, and reducing
some confusion with new jQuery users using AJAX calls but still
thinking in non-JSON mode to pass parameters.

(function($) {
  var _inherit = $.param;
  $.param = function(a) { return (a.constructor == String)?
a:_inherit(a); };
})(jQuery);

This overrides jQuery.param() with inheritance to support the passing
of string KV pairs parameters while keeping with backward support for
Object or Array parameters to the AJAX functions; .load, .get, etc.

string: .load(url,"p1=v1&p2=v2.&pn=vn");
JSON: .load(url,{p1:'v1', p2:'v2' ,pn:'vn'});

--
HLS



[jQuery] Re: New jQuery.param() plugin (override) : Adds url Key=Value Parameter String Support

2007-08-19 Thread Pops

Small change:

In the case "Team jQuery" decide to implement the jQuery.param()
String support enhancement suggestion (Ticket #1516) in the next
1.1.4.1 update, in the interim, you might want to add a version check:

(function($) {
  var _inherit = $.param;
  if ($.fn.jquery && $.fn.jquery <= "1.1.3.1") {
 $.param = function(a) {
 return (a.constructor == String)?a:_inherit(a);
 };
  }
})(jQuery);

---
HLS

On Aug 19, 11:46 am, Pops <[EMAIL PROTECTED]> wrote:
> My first plugin, simple, but may provide some usefulness, and reducing
> some confusion with new jQuery users using AJAX calls but still
> thinking in non-JSON mode to pass parameters.
>
> (function($) {
>   var _inherit = $.param;
>   $.param = function(a) { return (a.constructor == String)?
> a:_inherit(a); };
>
> })(jQuery);
>
> This overrides jQuery.param() with inheritance to support the passing
> of string KV pairs parameters while keeping with backward support for
> Object or Array parameters to the AJAX functions; .load, .get, etc.
>
> string: .load(url,"p1=v1&p2=v2.&pn=vn");
> JSON: .load(url,{p1:'v1', p2:'v2' ,pn:'vn'});
>
> --
> HLS



[jQuery] Re: Totally new to this...

2007-08-19 Thread Shaft


Yap it works

:clap:

...It's still problematic - with the hover effects. The "+" zoom-in button
for some reason appears chopped onDrag... Can I fix this with CSS or is more
code needed?
-- 
View this message in context: 
http://www.nabble.com/Totally-new-to-this...-tf4282816s15494.html#a12223628
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] functions not working on ajax generated content

2007-08-19 Thread MrNase

Hello!

I have one very annoying problem.

First of all, I have a list of items. Each items contains information
that I want to display on the webpage using several functions.

Here's an example:
function getNumbers() {
var numberofentries = $('#kilometer-data li').size();
}


Everything works when I have a static list that is generated by PHP
everytime I load the page but I want to use Ajax to load the list.

The problem is that the functions don't work. :(


I have the function called init() where I use Ajax.get to fetch the
list and I have several other functions but writing them down like:

$(document).ready(function() {

init();

otherfunction(); // booth need the data provided by init();

function();


});

doesn't work. otherfunction() and function() are unable to work with
the data generated by init()


I really hope you understood my problem. ;-)


Thanks,
Dominik



[jQuery] Re: [PLUGIN] Templater

2007-08-19 Thread Pops



On Aug 19, 2:37 am, "Yehuda Katz" <[EMAIL PROTECTED]> wrote:
>
> Effectively, you stick the template in a CDATA block, and it can then be
> converted in the same way I described earlier. Cool shit, huh?

Yup. This is basically how our server WCT (Wildcat Template)system
works and I have been exploring jQuery to replace/take over some of
this functionality.  The benefits is to improve server scalability by
offloading server template processing to the client.

The difference here is that we don't use {{field}} tags, but instead
@field@ tags.  So instead of this:

  First Name: {{first}}
   Last Name: {{last}}

We have:

  First Name: @firs@
   Last Name: @last@

But part of the problem in our consideration is that we might have to
use different tags to escape any @field@ processing as the server
spits out the page to the browser.

So maybe using {{tag}} could be used :-)

I'm definitely going to study your plugin.  Thanks

--
HLS






[jQuery] Re: Strange bug with slide function and input elements

2007-08-19 Thread Bernd Matzner

Hi Jeroen,

the slideUp and slideDown animations are happening at the same time,
because you're calling them one after another (and each takes a while
to complete).
One simple, yet not really elegant way of working around it is this:
Exclude the paragraph in the clicked element from the list of
paragraphs to be slid up by using not():

$('.accordion p:visible').not($(this).siblings('p')).slideUp('fast');

That way, even if the slideDown function set the paragraph to visible,
it will not be subject to the slideUp function.

Bernd



[jQuery] Re: stop animation

2007-08-19 Thread Cybolic

You're absolutely correct John, it does not stop animation, thanks for
clearing that up.
I'm sorry for misleading you guys, I should have tested my claim more
thoroughly.

To try and make up for my mistake, I've packaged John's new code into
a plugin and added a skip function that skips the current animation
(and goes to the next in queue).

You can find it here:

  demo:
  http://untied.dk/jquery/stop/index.html

  plugin:
  http://untied.dk/jquery/stop/jquery.animstop.js

Sorry for the confusion.

 - Christian Dannie Storgaard

P.S. I haven't added the full new effect code from John's latest
version, just the stuff needed to make stop work, so there may be
something that doesn't work, but I haven't found anything so far.

On Aug 19, 6:36 am, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote:
> John, i now completely get what u mean... This is actually not stopping
> animation ;-).
>
> :-( we will wait for jquery 1.2 in the meantime... Thanks for letting us
> know.
>
> -GTG
>
> On 8/18/07, Ganeshji Marwaha <[EMAIL PROTECTED]> wrote:
>
>
>
> > Ok, there is no way i can oppose that. You are an authority in what u r
> > talking about and i comletely agree with u. I also understand exactly what u
> > mean when u say that...
>
> > That said, the interesting part is, in the case of my lavalamp plugin
> >http://www.gmarwaha.com/jquery/lavalamp/test/test.html, this code seems
> > to solve the problem that could be solved by stopping animations in the
> > middle. I don't understand how this works then. I willd be glad if you can
> > explain that please.
>
> > -GTG
>
> >  On 8/18/07, John Resig <[EMAIL PROTECTED]> wrote:
>
> > > That code doesn't work - it doesn't stop any animations, it only
> > > clears the animation queue (stopping any future queued animations).
>
> > > You can't build a true stop animation without modifying jQuery core.
> > > Here's a page that demonstrates that code that's going into jQuery
> > > 1.2:
> > >http://dev.jquery.com/~john/ticket/stop/
>
> > > --John
>
> > > On 8/17/07, Cybolic <[EMAIL PROTECTED]> wrote:
>
> > > > You can start and stop an animation like so:
>
> > > > // start
> > > > $('#animationElement').animate({width: 50}, slow);
>
> > > > // stop
> > > > $.dequeue($('#animationElement').get(0), "fx");
>
> > > > You can of course define a helper for it like so:
>
> > > > $.fn.stop = function(){
> > > > this.each(function(){
> > > > $.dequeue(this, "fx");
> > > > });
> > > > return this;
> > > > };
>
> > > >  - now you can just do: $('#animationElement').stop();
>
> > > > This should really be added to the documentation, or given a shortcut.
> > > > If anyone would do this, or tell me how to do it, that'd be great.
>
> > > > Cheers,
> > > > Christian Dannie
>
> > > > On Aug 4, 6:40 am, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote:
> > > > > hi friends,
>
> > > > > is there a way to stop an animation after it has started? any hack
> > > that will
> > > > > make this happen will be useful...
>
> > > > > thanks in advance,
> > > > > -GTG



[jQuery] Re: functions not working on ajax generated content

2007-08-19 Thread Michael Geary

> From: MrNase
> 
> I have the function called init() where I use Ajax.get to 
> fetch the list and I have several other functions but writing 
> them down like:
> 
> $(document).ready(function() {
>init();
>otherfunction(); // booth need the data provided by init();
>function();
> });
> 
> doesn't work. otherfunction() and function() are unable to 
> work with the data generated by init()

The Ajax download is asynchronous. When your init() function returns, the
data hasn't been downloaded yet.

Use the callback parameter to $.get to provide a function which will be
called when the download is complete. Call your otherfunction() and
function() from within that callback function.

http://docs.jquery.com/Ajax#.24.get.28_url.2C_params.2C_callback_.29

-Mike



[jQuery] hide table rows when we type in text box

2007-08-19 Thread Potluri


Hi everyone, 
 Thanks for everyone who responded for my previous queries.
 Here is an assignment which I feel challenging for our for our jquery guys.
for table with 500 rows. I don't want to use any plugin for this.

Well the task is when we type some thing in a text box it has to show only
those rows which has the value typed in textbox
in one coloumn.

For ex. 
consider a table with id "example" 


 blah vijay
 blah victor
 blah avinash
 blah steven/td>
 blah russell
 blah suresh




So, when I type in "vi" in text box only rows that has vijay,victor,avinash
should be shown, remaining should be hidden since all of them has Vi in
their names.

I did it in this way,
let id of text box be textId
$("#textId").keyup(function(){
var val=$("#textId").val(); // which gives value typed in textbox
$("#example tbody tr td.name").each(
function()
{
if( $(this).html().indexOf("val") == -1)
{
 $(this).hide();
}
else  $(this).show();
});
});


This works fine but it's taking 2 secs to do for table with 500 rows. Is
there any better way to do this.
Any staright help is appreciated.
Thanks in advance.

-- 
View this message in context: 
http://www.nabble.com/hide-table-rows-when-we-type-in-text-box-tf4294139s15494.html#a12224030
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: ASP.NET IDs

2007-08-19 Thread [EMAIL PROTECTED]

Thank you all very much for the replies.  They came in very useful!

One quick question for Sam, though.  You said you don't use gridviews,
etc... what do you do then?  Manually write the tables?

On Aug 19, 1:52 pm, Stephan Beal <[EMAIL PROTECTED]> wrote:
> On Aug 18, 10:29 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > 2) I'm also using AJAX update panel to update a gridview.  Everything
> > is working great.  However, once I update the gridview and it's
> > refreshed in AJAX, my jQuery no longer works, even though the code is
> > there.
>
> This sounds like one of the FAQ questions:
>
> http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...



[jQuery] Re: Templater

2007-08-19 Thread Yehuda Katz

It would be trivial to change the template field syntax. In the next
revision of this thing, I'll probably just make it configurable.

-- Yehuda

On Aug 19, 9:23 am, Pops <[EMAIL PROTECTED]> wrote:
> On Aug 19, 2:37 am, "Yehuda Katz" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Effectively, you stick thetemplatein a CDATA block, and it can then be
> > converted in the same way I described earlier. Cool shit, huh?
>
> Yup. This is basically how our server WCT (WildcatTemplate)system
> works and I have been exploring jQuery to replace/take over some of
> this functionality.  The benefits is to improve server scalability by
> offloading servertemplateprocessing to the client.
>
> The difference here is that we don't use {{field}} tags, but instead
> @field@ tags.  So instead of this:
>
>   First Name: {{first}}
>Last Name: {{last}}
>
> We have:
>
>   First Name: @firs@
>Last Name: @last@
>
> But part of the problem in our consideration is that we might have to
> use different tags to escape any @field@ processing as the server
> spits out the page to the browser.
>
> So maybe using {{tag}} could be used :-)
>
> I'm definitely going to study your plugin.  Thanks
>
> --
> HLS



[jQuery] Re: Simulate foucs on any div, really get Firebug and use it

2007-08-19 Thread Mitch

I look at it and I see a bunch of problems :)

But I should have made it clearer that this is a "simulation" for our
current visual search engine at whatbird.com

The current engine is very web 1.0-ish

http://identify.whatbird.com/mwg/_/0/attrs.aspx

Thank you for the compliments.

I have several more features to add that use plugins. I really want to
use "cycle"

Mitch

On Aug 18, 3:17 pm, Stephan Beal <[EMAIL PROTECTED]> wrote:
> On Aug 18, 9:43 pm, Mitch <[EMAIL PROTECTED]> wrote:
>
> > In fact this demo has a little bit of every thing in it.
>
> That's what impressed me. It really is a full-fledged app (or appears
> to be - i couldn't figure out how to get it to do anything, so i
> assume it's a prototype or mock-up). You did a hell of a job on the
> UI.



[jQuery] Re: Simulate foucs on any div, really get Firebug and use it

2007-08-19 Thread Mitch

Thanks Aaron. I had to make the left margin a fixed number. When I
make it auto it works great, but when I click on new search the entire
frame shifts to the left a few pixels and I am stuck on why.

On Aug 18, 2:23 pm, "Aaron Heimlich" <[EMAIL PROTECTED]> wrote:
> On 8/18/07, Mitch <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am pretty sure I can get the outdiv to float in the center of the page,
> > I just
> > have to remember how to do it.
>
> I believe this is what you're looking for:
>
> body {
> position: relative;
> margin-left: auto;
> margin-right: auto;
> width: 797px;
>
> }
>
> --
> Aaron Heimlich
> Web Developer
> [EMAIL PROTECTED]://aheimlich.freepgs.com



[jQuery] Re: [PLUGIN] Templater

2007-08-19 Thread Pops

Hi Yehuda,

I grabbed your plugged and tried it out.   I think I can used it with
some enhancements I am going to suggest .

First let me tell ya what I found.

I got your simple first/last tag demo to work, but using that as a
model for a test page I have already been working on for data/html
binding, but I can't get it to work.  By that, I mean, nothing showed
up:

I started with this:

  

  

Click
  

The jqupdate.wcx is a server-side pcode (compiled) applet that runs on
our server. I have this WCX returning JSON formatted structures.
cmd=status returns something like this:

{Time:'01:06:46',Cid:'339',TotalMsgs:'33424',TotalFiles:'1179',TotalCalls:'17506',TotalUsers:'475'}

and the call was made, but it appeared like the template is not
processed

After exploring everything I can think of using plain vanilla divide
and conquer techniques (meaning trying to get it down to match your
demo),  I finally found that the tags are case sensitive.

Changing the WCX and {{fields}} to lower case and now it worked!  The
template was processed.!

I like it!

Suggestions:

I passing long time engineering tips based on our own system so
consider these very practical. :-)

1) Case Insensitive Tag Support

Case sensitivity issues are for code, language or tools progammers,
not higher level end users or application developers. :-)

For something like this,  application developers are going to use
capitalize tags for readability, "TotalFiles" as oppose to"totalfiles"
should not make a difference or be a requirement.

2) Always process the template

Even if the tags are not found or error display the template.  This
will help developers debug their templates, i.e, a typo in a
{{field}}, etc.   You might want to offer an option to return blank
for tags not found instead of just displaying the tag.  The reason is
straight found.  Some tags are blank or empty strings, so to reduce
server template memory, some times an application may not save blank
fields.  For JSON, the applet may not wish to pass it along.  I
suggest the latter should be default (blank for tags not found) and
then offer a "debug" flag to show tags that are not found to help
debug templates.

3) Add Extended Syntax:

Consider adding an extended JSON syntax support . This will give your
pluging flexibility and growth potential.   I provided some examples
below how the extended syntax can come into play.

4)  Consider adding some common Ad-Hoc (JSON) Table Reporting
Templates.

Many people may want to create common reporting display output for a
JSON "result set", like tables like I have above.
Your plugin would automatically create it based on the number of
fields in the JSON using the tag name as the field name.

In practice, this is highly desirable especially in the corporate
setting since most of time that it all you want as they do with
standard ad-hoc report generators.  It would be one less thing that
has to be created in the HTML.

Now, if you only did it at the basic level with simple JSON output,
that would be great 80% of the time, but you can also extend it so
that the JSON data can help define some basic reporting attributes.

(Side Note: I clearly understand the philosophical debates regarding
separatring data vs rendering.  In addition, I'm still new to JSON
constructs, so I am not an expert yet in easily transformation data
into JSON.  Seems easy, but I'm still learning. So use this below to
illustrate only)

Basic Minimum Syntax:

{tag:value.}

Extended Syntax:

{
Settings: (title, direction, [field_names], {css} }
Data: {tag:value...} or [ {tag:value...},   {tag:value...}]
}

Example: Single column table sing the JSON tags as cell name.

{Time:'01:06:46',Cid:'339',TotalMsgs:'33424',TotalFiles:'1179',TotalCalls:'17506',TotalUsers:'475'}

Example: Same as above using extended syntax with title.

{
  Settings: {Title:"Server Status", Direction: Single}
  Data:
{Time:'01:06:46',Cid:'339',TotalMsgs:'33424',TotalFiles:'1179',TotalCalls:'17506',TotalUsers:'475'}
}

Example: Multple column table
{
  Settings: {Title:"List of files", Fields: ['File Name', File Size',
'Upload date']}
  Data:
   [
   {Name:".zip", size: '12312', date: '2008/08/10"},
   {Name:"zzip", size: '32423423', date: '2008/08/10"},
   {Name:"y.zip", size: '14543543', date: '2008/08/18"}
   ]
}

5)  Add some JSON flow controls

Here we want JSON to "control" AJAX. For example, in my server status
example I want to update every 10 second using a get method..  You can
do this with the extended syntax:

{
  Ajax: {Poll: 10; href: "/code/jsupdate?cmd=status", method: 'get''}
  Settings: {Title:"Server Status", Direction: Single}
  Data:
{Time:'01:06:46',Cid:'339',TotalMsgs:'33424',TotalFiles:'1179',TotalCalls:'17506',TotalUsers:'475'}
}

Thats it for now!

Great Plug-in!!   Maybe I can help you make it even Greater! 

If you like you can email me directly to discuss it.

--
HLS



[jQuery] [ANNOUNCE] - jqDnR R2 Released

2007-08-19 Thread Brice Burgess


I have updated the jqDnR ("jQuery Drag and Resize") plugin today. 
Changes include;


 + Multiple Independent initialization of Elements called by $.jqDrag 
or $.jqResize.


 + Detection of the dimensions plugin to alleviate Internet Explorer 
"jumpiness" with elements that have fixed or percentage based position.


 + Improved resize interactivity experience in IE with better tolerance 
of elements without "layout".


--- one bug remains; Opera 9 dragging appears to be broken for 
relativeley positioned elements due to $.css('top') and $.css('left') 
returning pixel position relative to page vs. parent element. This is 
probably good design by them... and I hope to investigate this issue 
further.


Plugin page;
 http://dev.iceburg.net/jquery/jqDnR/

Enjoy!

~ Brice



[jQuery] Re: Templater

2007-08-19 Thread Pops


On Aug 19, 2:09 pm, Yehuda Katz <[EMAIL PROTECTED]> wrote:
> It would be trivial to change the template field syntax. In the next
> revision of this thing, I'll probably just make it configurable.

That is a good idea Yehuda.  Offer a Begin/End tag because I think
there are other server-side processors with different begin/end
takes.   Off hand, I've seen:

 @;
Not sure if I have this one right, but I saw
something like that.

Maybe others can chime in what info.

I want to share some test results  - Good and bad news (for me).

As I mentioned,  one reason for exploring jQuery was our strategy to
explore moving of server template processing to the client in the most
'unobstrusive' way possible.  Minimum changes required by our
customers with their existing WCT templates. I've been learning every
aspect of jQuery doing pieces of this and that all leading to putting
all the parts together and begin applying it and do some comparing
testing. The main goal was to explore the reduction of server overhead
by moving this template processing to the client.

Well,  thanks to your plugin I was able to do a local server quick
test.  Your similar template syntax allowed me take existing WCT
templates, do global changes to the @@ macros to {{}} syntax and do
some rendering testing.

Using Firefox profiling, as expected.

- The server processing was reduced,
- However, total rendering time increased dramatically.

I  need to next test this across the network, but for the local server
test,  it was 15ms vs ~550ms to 1secs.  But from a server standpoint,
it was definitely a drastic improviement with the AJAX request was not
even measurable.  The high time was in JS template processing.

It might be a non-issue as machines get faster, but depending on how
noticable any "sluggish" displaying is seen by end users, it may raise
comments, especially when its not sluggish today. :-)

Anyway, this is good. Thanks.

--
HLS



[jQuery] Re: Totally new to this...

2007-08-19 Thread polyrhythmic

Interface's iDrag.js source, draggable clone build() fn, Line 480:
> els.overflow = 'hidden';

setting the draggable's overflow to hidden may be integral to the
creation, so I don't want to change the source.
You can fix this with CSS, shift the whole box down perhaps with a
wrapper div so that nothing is out of bounds of the draggable box.

Charles
doublerebel.com

On Aug 19, 9:18 am, Shaft <[EMAIL PROTECTED]> wrote:
> Yap it works
>
> :clap:
>
> ...It's still problematic - with the hover effects. The "+" zoom-in button
> for some reason appears chopped onDrag... Can I fix this with CSS or is more
> code needed?
> --
> View this message in 
> context:http://www.nabble.com/Totally-new-to-this...-tf4282816s15494.html#a12...
> Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: [ANNOUNCE] - jqDnR R2 Released

2007-08-19 Thread Benjamin Sterling
Brice, nice work.

Have you tried the updated dimensions plugin to fix that bug?

All in all it is looking good.

On 8/19/07, Brice Burgess <[EMAIL PROTECTED]> wrote:
>
>
> I have updated the jqDnR ("jQuery Drag and Resize") plugin today.
> Changes include;
>
>   + Multiple Independent initialization of Elements called by $.jqDrag
> or $.jqResize.
>
>   + Detection of the dimensions plugin to alleviate Internet Explorer
> "jumpiness" with elements that have fixed or percentage based position.
>
>   + Improved resize interactivity experience in IE with better tolerance
> of elements without "layout".
>
> --- one bug remains; Opera 9 dragging appears to be broken for
> relativeley positioned elements due to $.css('top') and $.css('left')
> returning pixel position relative to page vs. parent element. This is
> probably good design by them... and I hope to investigate this issue
> further.
>
> Plugin page;
>   http://dev.iceburg.net/jquery/jqDnR/
>
> Enjoy!
>
> ~ Brice
>
>


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


[jQuery] Re: [jqModal] - r11 release, improvements.

2007-08-19 Thread Benjamin Sterling
Brice, very nice work.

On 8/18/07, Brice Burgess <[EMAIL PROTECTED]> wrote:
>
>
> Ladies and Gentleman,
>
>   A few hundred bytes were added to the jqModal plugin to aid those
> struggling with z-Index container stacking issues. Namely; there's now
> a shortcut** to overcome "the overlay covers everything, including the
> dialog!" issues. Other improvements include a fault-tolerant focus
> method as well as avoidance of IE z-Index stacking order issues.
>
>   It has been awhile since this plugin made an announcement in the -
> disuss limelight -- so for those that haven't heard; r10 was released
> and addressed some long-standing issues [detailed @ plugin page] as
> well as current [1.1.3.1] jQuery compatibility issues.
>
>   The plugin page can be found @
> http://dev.iceburg.net/jquery/jqModal/index.php
>
>   A demonstration of the new toTop method can be found @
> http://dev.iceburg.net/jquery/jqModal/toTop.html
>
>   The z-Index issue effects many-a-user of many-a-dialog-script... and
> thus may prove of interest to you even if you *don't* use jqModal.
>
>   Hope you're all having an enjoyable weekend && || coding experience!
>
> ~ Brice
>
> ** I decided to add to the base for convenience. For those die-hards,
> the same functionality of the toTop method could be added via the
> onShow and onClose callback functions using the following code;
>
> [!-- JS --]
>
> var showModal = function(h) {
> // remember DOM posistion of window
> h.w.before('');
>
> // NOTE: above can be combined in the chain...
> // move after overlay (child of body), avoids z-index issues
> // show window
> h.w.insertAfter(h.o).show();
> };
>
> var closeModal = function(h) {
>
> // remove overlay
> h.o.remove();
>
> // restore DOM position of window
> // remove placeholder
> // hide window
> $('#jqmPlace'+h.w[0]._jqm).after(h.w.hide()).remove();
> };
>
>


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


[jQuery] Re: Templater

2007-08-19 Thread xavier

Have you seen this post ? Thats going in the same direction I think,
and I like the idea of being able to use the template for an array.

http://www.dennydotnet.com/post/JavaScript-Model-Objects-JMO---An-Idea.aspx

Otherwise, a more complete, non jquery based one:
http://code.google.com/p/trimpath/wiki/JavaScriptTemplates

X+

On Aug 19, 9:27 pm, Pops <[EMAIL PROTECTED]> wrote:
> On Aug 19, 2:09 pm, Yehuda Katz <[EMAIL PROTECTED]> wrote:
>
> > It would be trivial to change the template field syntax. In the next
> > revision of this thing, I'll probably just make it configurable.
>
> That is a good idea Yehuda.  Offer a Begin/End tag because I think
> there are other server-side processors with different begin/end
> takes.   Off hand, I've seen:
>
>  @;
> Not sure if I have this one right, but I saw
> something like that.
>
> Maybe others can chime in what info.
>
> I want to share some test results  - Good and bad news (for me).
>
> As I mentioned,  one reason for exploring jQuery was our strategy to
> explore moving of server template processing to the client in the most
> 'unobstrusive' way possible.  Minimum changes required by our
> customers with their existing WCT templates. I've been learning every
> aspect of jQuery doing pieces of this and that all leading to putting
> all the parts together and begin applying it and do some comparing
> testing. The main goal was to explore the reduction of server overhead
> by moving this template processing to the client.
>
> Well,  thanks to your plugin I was able to do a local server quick
> test.  Your similar template syntax allowed me take existing WCT
> templates, do global changes to the @@ macros to {{}} syntax and do
> some rendering testing.
>
> Using Firefox profiling, as expected.
>
> - The server processing was reduced,
> - However, total rendering time increased dramatically.
>
> I  need to next test this across the network, but for the local server
> test,  it was 15ms vs ~550ms to 1secs.  But from a server standpoint,
> it was definitely a drastic improviement with the AJAX request was not
> even measurable.  The high time was in JS template processing.
>
> It might be a non-issue as machines get faster, but depending on how
> noticable any "sluggish" displaying is seen by end users, it may raise
> comments, especially when its not sluggish today. :-)
>
> Anyway, this is good. Thanks.
>
> --
> HLS



[jQuery] Re: [ANNOUNCE] - jqDnR R2 Released

2007-08-19 Thread Rey Bango
Brice, in FF v2.0.0.6, if I resize the box (div I assume), the text 
inside of the box overflows. It happens on both examples.


I've attached a pic for you to look at.

Rey...

Brice Burgess wrote:


I have updated the jqDnR ("jQuery Drag and Resize") plugin today. 
Changes include;


 + Multiple Independent initialization of Elements called by $.jqDrag or 
$.jqResize.


 + Detection of the dimensions plugin to alleviate Internet Explorer 
"jumpiness" with elements that have fixed or percentage based position.


 + Improved resize interactivity experience in IE with better tolerance 
of elements without "layout".


--- one bug remains; Opera 9 dragging appears to be broken for 
relativeley positioned elements due to $.css('top') and $.css('left') 
returning pixel position relative to page vs. parent element. This is 
probably good design by them... and I hope to investigate this issue 
further.


Plugin page;
 http://dev.iceburg.net/jquery/jqDnR/

Enjoy!

~ Brice


<>

[jQuery] Re: Templater

2007-08-19 Thread Pops



On Aug 19, 3:49 pm, xavier <[EMAIL PROTECTED]> wrote:
> Have you seen this post ? Thats going in the same direction I think,
> and I like the idea of being able to use the template for an array.
>
> http://www.dennydotnet.com/post/JavaScript-Model-Objects-JMO---An-Ide...
>
> Otherwise, a more complete, non jquery based one:
> http://code.google.com/p/trimpath/wiki/JavaScriptTemplates

Oh how interesting! The TrimPath method I can relate to!   Very nice.

--
HLS




[jQuery] Re: A Simple Question ! (mouseover)

2007-08-19 Thread Ganeshji Marwaha
try this...

$("img").mouseover(function(){
   $(this).prev("span").html("");
});

-GTG


On 8/19/07, Kixe <[EMAIL PROTECTED]> wrote:
>
>
> 
> 
> 
> 
> 
> 
>
> $(document).ready(function() {
>
>   $("img").mouseover(function(){
>  $("span").html("");
> });
>
> $("span").mouseout(function(){
>   $(this).html("");
> });
>
> });
>
> Mouse point to IMG1, all of it hover,
> How can I piont to IMG1, IMG1 hover, and IMG2 , IMG2 hover only .
>
>


[jQuery] Re: hide table rows when we type in text box

2007-08-19 Thread George

Yep, a few wee suggestions in no particular order...

1. Instead of .hide() and .show() try adding/removing the name of a
class that makes the element hidden. (Can be faster for the css engine
to do the hiding for you). Also, the toggleClass() method may be
handy.

2. The spaces in your selector each search to any depth. The child
selector ">" can often speed things up. Eg: $
("#example>tbody>tr>td.name")

3. Instead of searching for td.name on every key stroke, try putting
the list of cells into a variable before hand and refer to that inside
the event handler. Eg: $cells = $("#example>tbody>tr>td.name"). This
is likely to have the biggest impact on performance.

4. Try hiding rows instead of cells.

5. Try searching in .text() instead of .html()

6. A longshot but if each row has many cells then try filtering by
the .text() of the rows first then by cells. (Only if you cannot do
suggestion 3)

7. The moreSelectors plugin has an invert() method that can swap the
results of the last filter() action.

8. The moreSelectors plugin has a colCells() method to return cells in
a given column index.

George

On Aug 19, 6:03 pm, Potluri <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>  Thanks for everyone who responded for my previous queries.
>  Here is an assignment which I feel challenging for our for our jquery guys.
> for table with 500 rows. I don't want to use any plugin for this.
>
> Well the task is when we type some thing in a text box it has to show only
> those rows which has the value typed in textbox
> in one coloumn.
>
> For ex.
> consider a table with id "example"
> 
> 
>  blah vijay
>  blah victor
>  blah avinash
>  blah steven/td>
>  blah russell
>  blah suresh
>
> 
> 
>
> So, when I type in "vi" in text box only rows that has vijay,victor,avinash
> should be shown, remaining should be hidden since all of them has Vi in
> their names.
>
> I did it in this way,
> let id of text box be textId
> $("#textId").keyup(function(){
> var val=$("#textId").val(); // which gives value typed in textbox
> $("#example tbody tr td.name").each(
> function()
> {
> if( $(this).html().indexOf("val") == -1)
> {
>  $(this).hide();}
>
> else  $(this).show();
>
> });
> });
>
> This works fine but it's taking 2 secs to do for table with 500 rows. Is
> there any better way to do this.
> Any staright help is appreciated.
> Thanks in advance.
>
> --
> View this message in 
> context:http://www.nabble.com/hide-table-rows-when-we-type-in-text-box-tf4294...
> Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: [ANNOUNCE] - jqDnR R2 Released

2007-08-19 Thread David Duymelinck

Adding overfow:hidden to the element solves the problem.

-- David

On Aug 19, 10:22 pm, Rey Bango <[EMAIL PROTECTED]> wrote:
> Brice, in FF v2.0.0.6, if I resize the box (div I assume), the text
> inside of the box overflows. It happens on both examples.
>
> I've attached a pic for you to look at.
>
> Rey...
>
> Brice Burgess wrote:
>
> > I have updated the jqDnR ("jQuery Drag and Resize") plugin today.
> > Changes include;
>
> >  + Multiple Independent initialization of Elements called by $.jqDrag or
> > $.jqResize.
>
> >  + Detection of the dimensions plugin to alleviate Internet Explorer
> > "jumpiness" with elements that have fixed or percentage based position.
>
> >  + Improved resize interactivity experience in IE with better tolerance
> > of elements without "layout".
>
> > --- one bug remains; Opera 9 dragging appears to be broken for
> > relativeley positioned elements due to $.css('top') and $.css('left')
> > returning pixel position relative to page vs. parent element. This is
> > probably good design by them... and I hope to investigate this issue
> > further.
>
> > Plugin page;
> >  http://dev.iceburg.net/jquery/jqDnR/
>
> > Enjoy!
>
> > ~ Brice
>
>
>
>  jqresize.JPG
> 13KViewDownload



[jQuery] Re: hide table rows when we type in text box

2007-08-19 Thread Michael Geary

It would be helpful to have a complete example of your actual HTML and
JavaScript code. The code you listed in your message is not working code:

1) The selector $("#example tbody tr td.name") will not select anything,
because your 's have no class attribute.

2) $(this).html().indexOf("val") shouldn't have the quotes around val.

3) Calling .show() and .hide() on the TD doesn't work in all browsers. I had
better luck using them on the TR.

It's fairly easy to make this code 20 times faster by writing straight DOM
code, but the code is more dependent on on the actual DOM structure.

Just for fun, I posted an example with about 1250 rows in the table:

http://mg.to/test/potluri/rower.html

Type some text into the Slow box and the Fast box to compare the timings.

The JavaScript code is in:

http://mg.to/test/potluri/rower.js

The slow() function in rower.js is basically the code you posted. The fast()
function is the improved version:

function fast() {
   var rows = [];
   var tbody = $('#example2 tbody')[0], trows = tbody.rows;
   
   for( var i = 0, n = trows.length;  i < n;  ++i ) {
  var row = trows[i];
  var col = row.firstChild;
  rows.push({ row:row, col:col, style:row.style, visible:true });
   }

   var nRows = rows.length;

   var $text = $('#textId2'), text = $text[0];

   $text.keyup( function() {
  var time = (new Date).getTime();
  var val = text.value;
  
  for( var i = 0;  i < nRows;  ++i ) {
 var row = rows[i], col = row.col;
 if( row.col.innerHTML.indexOf(val) != -1 ) {
if( ! row.visible ) {
   row.visible = true;
   row.style.display = '';
}
 }
 else {
if( row.visible ) {
   row.visible = false;
   row.style.display = 'none';
}
 }
  }
  $('#time2').html(
 ( ( (new Date).getTime() - time ) / 1000 ) + ' seconds' );
   });
}

As you can see, there is no jQuery code in the inner loop in the keyup
function. Some of the tricks that make it go fast:

1) Prebuilding the rows table with references to each row, column, style
attribute, and a visible boolean. (This takes a little extra time at startup
but pays for itself on each keystroke.)

2) Plain "for" loops instead of .each().

3) Saving references to jQuery objects instead of repeated $(...) calls.

4) Testing the row.visible boolean instead of hitting the DOM to test the
display attribute.

The code assumes that the TD containing the name is the first TD in each
row. If that's incorrect, you'd need to change the "var col =
row.firstChild;" statement.

-Mike

> From: Potluri
> 
> Hi everyone, 
>  Thanks for everyone who responded for my previous queries.
>  Here is an assignment which I feel challenging for our for 
> our jquery guys.
> for table with 500 rows. I don't want to use any plugin for this.
> 
> Well the task is when we type some thing in a text box it has 
> to show only
> those rows which has the value typed in textbox
> in one coloumn.
> 
> For ex. 
> consider a table with id "example" 
> 
> 
>  blah vijay
>  blah victor
>  blah avinash
>  blah steven/td>
>  blah russell
>  blah suresh
> 
> 
> 
> 
> So, when I type in "vi" in text box only rows that has 
> vijay,victor,avinash
> should be shown, remaining should be hidden since all of them 
> has Vi in
> their names.
> 
> I did it in this way,
> let id of text box be textId
> $("#textId").keyup(function(){
> var val=$("#textId").val(); // which gives value typed in textbox
> $("#example tbody tr td.name").each(
> function()
> {
> if( $(this).html().indexOf("val") == -1)
> {
>  $(this).hide();
> }
> else  $(this).show();
> });
> });
> 
> 
> This works fine but it's taking 2 secs to do for table with 
> 500 rows. Is
> there any better way to do this.



[jQuery] Re: - jqDnR R2 Released

2007-08-19 Thread Stephan Beal

> --- one bug remains; Opera 9 dragging appears to be broken for
> relativeley positioned elements due to $.css('top') and $.css('left')
> returning pixel position relative to page vs. parent element. This is
> probably good design by them... and I hope to investigate this issue
> further.

Hi, Brice!

i don't know if this is intentional/known, but in expample 3, resizing
the widget causes the gap where it is originally positioned to change
size, regardless of whether or not the widget has been moved or not.
Firefox 2.0.0.6, but i remember this also happeneing with FF 2.0.0.5.

To reproduce, simply resize the 3rd example's widget. Then move it up
a ways and resize again, and watch the space where it originally was
change size along with the widget.



[jQuery] Re: hide table rows when we type in text box

2007-08-19 Thread Michael Geary

I just noticed one tiny bit of dead code in the function I posted:

>  var row = rows[i], col = row.col;

Can be:

>  var row = rows[i];

Since the col variable is unused.

-Mike



[jQuery] Re: [ANNOUNCE] - jqDnR R2 Released

2007-08-19 Thread weepy

Hey great plugin - are you likely to add a 'containment' option ?



On Aug 19, 9:22 pm, Rey Bango <[EMAIL PROTECTED]> wrote:
> Brice, in FF v2.0.0.6, if I resize the box (div I assume), the text
> inside of the box overflows. It happens on both examples.
>
> I've attached a pic for you to look at.
>
> Rey...
>
> Brice Burgess wrote:
>
> > I have updated the jqDnR ("jQuery Drag and Resize") plugin today.
> > Changes include;
>
> >  + Multiple Independent initialization of Elements called by $.jqDrag or
> > $.jqResize.
>
> >  + Detection of the dimensions plugin to alleviate Internet Explorer
> > "jumpiness" with elements that have fixed or percentage based position.
>
> >  + Improved resize interactivity experience in IE with better tolerance
> > of elements without "layout".
>
> > --- one bug remains; Opera 9 dragging appears to be broken for
> > relativeley positioned elements due to $.css('top') and $.css('left')
> > returning pixel position relative to page vs. parent element. This is
> > probably good design by them... and I hope to investigate this issue
> > further.
>
> > Plugin page;
> >  http://dev.iceburg.net/jquery/jqDnR/
>
> > Enjoy!
>
> > ~ Brice
>
>
>
>  jqresize.JPG
> 13KViewDownload



[jQuery] TableSorter 2.0 force update?

2007-08-19 Thread Chris

I'm playing with adding a filtering widget to table sorting, e.g.
"hide any row where column 7 < 500." Users can keep add or remove
filters dynamically. When they do, I'd like the table to update
immediately, but I don't see how to do that. Calling click() on a
header would change the current sort order. Calling tablesorter()
again seems to break sorting when clicking on columns.



[jQuery] TableSorter 2.0 pager bug

2007-08-19 Thread Chris

Simple, I think. I tried putting the page view control at the top of
my table and setting positionFixed to false, but it still jumped to
the bottom when I changed page size.

Either savePage() or fixPosition() should check positionFixed before
moving the page number container.

if fixPosition() checks positionFixed, then the check on positionFixed
inside renderTable() can be removed,so that seems like the better
change.

Or did I miss the point?

What I'd actually like even better is allowing a page view control at
both the top and bottom of the table.



[jQuery] Re: A Simple Question ! (mouseover)

2007-08-19 Thread JDStar



On Aug 19, 11:33 am, Kixe <[EMAIL PROTECTED]> wrote:
> 
> 
> 
> 
> 
> 
>
> $(document).ready(function() {
>
>$("img").mouseover(function(){
>   $("span").html("");
>
> });
>
>   $("span").mouseout(function(){
>$(this).html("");
>
> });
> });
>
> Mouse point to IMG1, all of it hover,
> How can I piont to IMG1, IMG1 hover, and IMG2 , IMG2 hover only .

Please try this:
$(this).prev("span").html("");

--
http://www.jdstar.pl



[jQuery] some javascript function on "some.html" won't work

2007-08-19 Thread Michael Lo
Dear all:

can some one help
why sometime i load some html like
$("somediv").show("slow").load("some.html");
some javascript function on "some.html" won't work
but it will work when call it alone?

Thanks!!

Michael


[jQuery] Resending> Interface.js Exception: Access to Restricted URI denied

2007-08-19 Thread G[N]Urpreet Singh
Hi,
Was trying to make a horizontal accordion with nice ease-in effects etc. I
first made the widget separately in an HTML file (which worked fine) and
then tried to embed it in my main HTML file. I got a funny exception.

Error: uncaught exception: [Exception... "Access to restricted URI denied"
code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location:
"file:///D:/work/ClientWork/Ask%20for%20Original/Site%20Design/HTML/interface.js
Line: 8"]

The code that gives the error is the last line in the snippet below. The
second last line happens nicely, though.

which = '#'+which+'_details';
$('.details').animate({width: 0 }, 500, "easein");
$(which).animate({className: "endcontent"}, 500, "easein");

Please suggest a solution.

Thanks

-- 
Gurpreet Singh


-- 
Gurpreet Singh


[jQuery] TableSorter 2.0 documentation notes

2007-08-19 Thread Chris

Two easy to fix errors:

The example code in Getting Started uses tableSorter() several times
rather than tablesorter(). Threw me off till I compared my code with
other examples.

http://tablesorter.com/docs/#Getting-Started

The example code for text extraction has comments left over from
forced sorting.

http://tablesorter.com/docs/example-option-text-extraction.html



[jQuery] Re: A Simple Question ! (mouseover)

2007-08-19 Thread JDStar



On Aug 19, 11:33 am, Kixe <[EMAIL PROTECTED]> wrote:
> 
> 

> $("span").html("");

> Mouse point to IMG1, all of it hover,
> How can I piont to IMG1, IMG1 hover, and IMG2 , IMG2 hover only .

Try like this:
$(this).prev("span").html("");

--
JDStar http://www.jdstar.pl



[jQuery] Re: Plugin for uploading multiple files/directories?

2007-08-19 Thread David Garcia Ortega

Hi Steve,

You can try with the following plugins:

http://www.malsup.com/jquery/form/ --> it allows simple upload of one
file.

http://www.pixeline.be/experiments/jqUploader/ --> it allows simple
upload with progress bar based on flash.

http://www.fyneworks.com/jquery/multiple-file-upload/ --> it allows
multiple file upload.


I've used the first one, it works perfectly for a single file upload
but it is a generic plugin to work with forms.


David.

On Aug 18, 4:14 am, "Steve Finkelstein" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm looking to allow a user to upload mutliple files or even better, an
> entire directory worth of files. Adding a progress bar for the batch or
> single file upload would be ideal.
>
> What's my best bet for doing this?
>
> Thanks.
>
> - sf



[jQuery] Re: some javascript function on "some.html" won't work

2007-08-19 Thread Matt Stith
you might be looking for $("#somediv"), $("somediv") is looking for
, while $("#somediv") is looking for .

Check out http://docs.jquery.com/DOM/Traversing/Selectors for some info on
selectors

On 8/19/07, Michael Lo <[EMAIL PROTECTED]> wrote:
>
> Dear all:
>
> can some one help
> why sometime i load some html like
> $("somediv").show("slow").load("some.html");
> some javascript function on "some.html" won't work
> but it will work when call it alone?
>
> Thanks!!
>
> Michael
>


[jQuery] Re: Resending> Interface.js Exception: Access to Restricted URI denied

2007-08-19 Thread John Resig

It's because you're trying to load a file from your local hard drive -
you need to have it hosted on the same domain as your page. (This is a
restriction in place in all browsers.)

--John

On 8/19/07, G[N]Urpreet Singh <[EMAIL PROTECTED]> wrote:
> Hi,
> Was trying to make a horizontal accordion with nice ease-in effects etc. I
> first made the widget separately in an HTML file (which worked fine) and
> then tried to embed it in my main HTML file. I got a funny exception.
>
> Error: uncaught exception: [Exception... "Access to restricted URI denied"
> code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location:
> "file:///D:/work/ClientWork/Ask%20for%20Original/Site%20Design/HTML/interface.js
> Line: 8"]
>
> The code that gives the error is the last line in the snippet below. The
> second last line happens nicely, though.
>
> which = '#'+which+'_details';
> $('.details').animate({width: 0 }, 500, "easein");
> $(which).animate({className: "endcontent"}, 500, "easein");
>
> Please suggest a solution.
>
> Thanks
>
> --
> Gurpreet Singh
>
>
> --
> Gurpreet Singh
>


[jQuery] Re: Templater

2007-08-19 Thread Pops



On Aug 19, 3:49 pm, xavier <[EMAIL PROTECTED]> wrote:
> Have you seen this post ? Thats going in the same direction I think,
> and I like the idea of being able to use the template for an array.
>
> Otherwise, a more complete, non jquery based one
> http://code.google.com/p/trimpath/wiki/JavaScriptTemplates

Xavier, been looking at this non jQuery trimpath template processor.
Whats interesting is that is also has conditional template processing
like what we have on our server side WCT system.

WCT: Server Side


@if Products.Size = 0@
 No products in your cart.
@else@
   @for 1 to  Products.Size@
   .products fields
   @next@
@endif@


TrimPath:  Client side


 {for p in products}
 ... product fields>
 {forelse}
 No products in your cart.
 {/for}


Of course, trimpath is not jQuery ready.  I think Yahuda could easily
add some conditional template processing.  But it needs to add support
for JSON arrays because that is where it will only make most sense.
But I can see some simple conditional processing like when the JSON
data is empty.

Yahuda Template Plugin: (Client side)


 


or something like that. 

--
HLS





[jQuery] Re: TableSorter 2.0 pager bug

2007-08-19 Thread Chris

Re my second point (two page display containers), perhaps another
approach would be to let users specify optional separate top and
bottom containers. That could also remove the need for positionFixed,
if one assumes a bottom container always needs to be moved.


On Aug 19, 4:15 pm, Chris <[EMAIL PROTECTED]> wrote:
> Simple, I think. I tried putting the page view control at the top of
> my table and setting positionFixed to false, but it still jumped to
> the bottom when I changed page size.
>
> Either savePage() or fixPosition() should check positionFixed before
> moving the page number container.
>
> if fixPosition() checks positionFixed, then the check on positionFixed
> inside renderTable() can be removed,so that seems like the better
> change.
>
> Or did I miss the point?
>
> What I'd actually like even better is allowing a page view control at
> both the top and bottom of the table.



[jQuery] Re: hide table rows when we type in text box

2007-08-19 Thread Potluri


I really appreciate your help. All of the mistakes which you figured out is
just a typo. I've it working but quite slow thats the reason I thought of
enhancing it.

Michael Geary wrote:
> 
> 
> It would be helpful to have a complete example of your actual HTML and
> JavaScript code. The code you listed in your message is not working code:
> 
> 1) The selector $("#example tbody tr td.name") will not select anything,
> because your 's have no class attribute.
> 
> 2) $(this).html().indexOf("val") shouldn't have the quotes around val.
> 
> 3) Calling .show() and .hide() on the TD doesn't work in all browsers. I
> had
> better luck using them on the TR.
> 
> It's fairly easy to make this code 20 times faster by writing straight DOM
> code, but the code is more dependent on on the actual DOM structure.
> 
> Just for fun, I posted an example with about 1250 rows in the table:
> 
> http://mg.to/test/potluri/rower.html
> 
> Type some text into the Slow box and the Fast box to compare the timings.
> 
> The JavaScript code is in:
> 
> http://mg.to/test/potluri/rower.js
> 
> The slow() function in rower.js is basically the code you posted. The
> fast()
> function is the improved version:
> 
> function fast() {
>var rows = [];
>var tbody = $('#example2 tbody')[0], trows = tbody.rows;
>
>for( var i = 0, n = trows.length;  i < n;  ++i ) {
>   var row = trows[i];
>   var col = row.firstChild;
>   rows.push({ row:row, col:col, style:row.style, visible:true });
>}
> 
>var nRows = rows.length;
> 
>var $text = $('#textId2'), text = $text[0];
> 
>$text.keyup( function() {
>   var time = (new Date).getTime();
>   var val = text.value;
>   
>   for( var i = 0;  i < nRows;  ++i ) {
>  var row = rows[i], col = row.col;
>  if( row.col.innerHTML.indexOf(val) != -1 ) {
> if( ! row.visible ) {
>row.visible = true;
>row.style.display = '';
> }
>  }
>  else {
> if( row.visible ) {
>row.visible = false;
>row.style.display = 'none';
> }
>  }
>   }
>   $('#time2').html(
>  ( ( (new Date).getTime() - time ) / 1000 ) + ' seconds' );
>});
> }
> 
> As you can see, there is no jQuery code in the inner loop in the keyup
> function. Some of the tricks that make it go fast:
> 
> 1) Prebuilding the rows table with references to each row, column, style
> attribute, and a visible boolean. (This takes a little extra time at
> startup
> but pays for itself on each keystroke.)
> 
> 2) Plain "for" loops instead of .each().
> 
> 3) Saving references to jQuery objects instead of repeated $(...) calls.
> 
> 4) Testing the row.visible boolean instead of hitting the DOM to test the
> display attribute.
> 
> The code assumes that the TD containing the name is the first TD in each
> row. If that's incorrect, you'd need to change the "var col =
> row.firstChild;" statement.
> 
> -Mike
> 
>> From: Potluri
>> 
>> Hi everyone, 
>>  Thanks for everyone who responded for my previous queries.
>>  Here is an assignment which I feel challenging for our for 
>> our jquery guys.
>> for table with 500 rows. I don't want to use any plugin for this.
>> 
>> Well the task is when we type some thing in a text box it has 
>> to show only
>> those rows which has the value typed in textbox
>> in one coloumn.
>> 
>> For ex. 
>> consider a table with id "example" 
>> 
>> 
>>  blah vijay
>>  blah victor
>>  blah avinash
>>  blah steven/td>
>>  blah russell
>>  blah suresh
>> 
>> 
>> 
>> 
>> So, when I type in "vi" in text box only rows that has 
>> vijay,victor,avinash
>> should be shown, remaining should be hidden since all of them 
>> has Vi in
>> their names.
>> 
>> I did it in this way,
>> let id of text box be textId
>> $("#textId").keyup(function(){
>> var val=$("#textId").val(); // which gives value typed in textbox
>> $("#example tbody tr td.name").each(
>> function()
>> {
>> if( $(this).html().indexOf("val") == -1)
>> {
>>  $(this).hide();
>> }
>> else  $(this).show();
>> });
>> });
>> 
>> 
>> This works fine but it's taking 2 secs to do for table with 
>> 500 rows. Is
>> there any better way to do this.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/hide-table-rows-when-we-type-in-text-box-tf4294139s15494.html#a12228175
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Simulate foucs on any div, really get Firebug and use it

2007-08-19 Thread Aaron Heimlich
On 8/19/07, Mitch <[EMAIL PROTECTED]> wrote:
>
> When I make it auto it works great, but when I click on new search the
> entire
> frame shifts to the left a few pixels and I am stuck on why.


I got the same thing, and I don't think you're causing it. When "Search
History" is collapsed, the entire application appears on screen, so there's
no need for a vertical scrollbar. When it's expanded however, part of it
extends past the bottom of the screen, so the browser creates a vertical
scrollbar.

Since you have both margin-left and margin-right set to "auto" (because the
centering technique won't work without this), they auto-adjust themselves
whenever the width of the viewport changes. In Firefox, Adding the vertical
scrollbar causes the width of the viewport to change slightly, causing the
margins to auto-adjust themselves, which causes the shift we both noticed.
The solution, then, is to force the scrollbar to always appear -- if it's
already there when "Search History" is expanded, then there are no
left/right margins that need to be auto-adjusted. Something like

body {
height: 100%;
}

Usually does this, but I don't think it'll work in your case since you seem
to have a bunch of wrappers that are absolutely positioned, so you may want
to use an explicit value that you know will trigger the vertical scrollbar
instead.

-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] Re: Simulate foucs on any div, really get Firebug and use it

2007-08-19 Thread Mitch

Gosh that is so nice of you. I suspeced the table was changing size
but I didnt think about the scroll bar. Thank you for finding that and
giving me a solution.

On Aug 19, 4:50 pm, "Aaron Heimlich" <[EMAIL PROTECTED]> wrote:
> On 8/19/07, Mitch <[EMAIL PROTECTED]> wrote:
>
>
>
> > When I make it auto it works great, but when I click on new search the
> > entire
> > frame shifts to the left a few pixels and I am stuck on why.
>
> I got the same thing, and I don't think you're causing it. When "Search
> History" is collapsed, the entire application appears on screen, so there's
> no need for a vertical scrollbar. When it's expanded however, part of it
> extends past the bottom of the screen, so the browser creates a vertical
> scrollbar.
>
> Since you have both margin-left and margin-right set to "auto" (because the
> centering technique won't work without this), they auto-adjust themselves
> whenever the width of the viewport changes. In Firefox, Adding the vertical
> scrollbar causes the width of the viewport to change slightly, causing the
> margins to auto-adjust themselves, which causes the shift we both noticed.
> The solution, then, is to force the scrollbar to always appear -- if it's
> already there when "Search History" is expanded, then there are no
> left/right margins that need to be auto-adjusted. Something like
>
> body {
> height: 100%;
>
> }
>
> Usually does this, but I don't think it'll work in your case since you seem
> to have a bunch of wrappers that are absolutely positioned, so you may want
> to use an explicit value that you know will trigger the vertical scrollbar
> instead.
>
> --
> Aaron Heimlich
> Web Developer
> [EMAIL PROTECTED]://aheimlich.freepgs.com



[jQuery] What to do when a plugin's css gets in your way

2007-08-19 Thread Mitch

What do you guys suggest when I use someone's plugin and its css
contains styles that alter my entire page.

I have never had this happen until I tried jTip, which is a very cool
tooltip plugin. It has a body style that changes its font to 62.5% of
an em, and that ends up shrinking all my fonts.

Mitch



[jQuery] Re: What to do when a plugin's css gets in your way

2007-08-19 Thread Pops

Mitch,

I came across the same issue with jTip until I studied it more.

The global.css provided jTip is only an example.  All you really need
here are the classes beginning with "JT_"   The CSS has an inline
comment separating the specific JT_ classes.

What I did was cut and paste these classes into a file called jTip.CSS
file and then I do this to customized them:

   
   @import '/public/js/jtip/css/jtip.css';
   #JT{ background-color: lightcyan; }
   .jTip   { cursor:default;}
   #JT_close_left  { background-color: green;  color: white; }
   #JT_close_right { background-color: green;  color: yellow;}
   "

ps: You may want to explore ClueTip. It has some improved ideas over
jTip, like proper placement so it isn't cut off, delaying the popup
until the hovering mouse is idle on the link, plus some other features
like Sticky Popups.

--
HLS

On Aug 19, 8:17 pm, Mitch <[EMAIL PROTECTED]> wrote:
> What do you guys suggest when I use someone's plugin and its css
> contains styles that alter my entire page.
>
> I have never had this happen until I tried jTip, which is a very cool
> tooltip plugin. It has a body style that changes its font to 62.5% of
> an em, and that ends up shrinking all my fonts.
>
> Mitch



[jQuery] Re: some javascript function on "some.html" won't work

2007-08-19 Thread Wizzud


What does "some.html" look like?
You imply that it can be run in its own right, ie that it is a full
document. IF you are trying to inject a full document into the DOM under the
'somediv' DIV then it would not be surprising if some functionality failed.


Michael Lo wrote:
> 
> Dear all:
> 
> can some one help
> why sometime i load some html like
> $("somediv").show("slow").load("some.html");
> some javascript function on "some.html" won't work
> but it will work when call it alone?
> 
> Thanks!!
> 
> Michael
> 
> 

-- 
View this message in context: 
http://www.nabble.com/some-javascript-function-on-%22some.html%22-won%27t-work-tf4295619s15494.html#a12228822
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Simulate foucs on any div, really get Firebug and use it

2007-08-19 Thread Aaron Heimlich
On 8/19/07, Mitch <[EMAIL PROTECTED]> wrote:
>
> I suspeced the table was changing size


I actually did try ditching the table, but the "New Search" button stopped
doing anything, so I left it in. It probably doesn't need to be there any
more, though.

but I didnt think about the scroll bar.


Neither did I until I caught it appearing and disappearing out of the corner
of my eye.

Thank you for finding that and giving me a solution.


No problem, dude. Happy to help.

-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] Re: ASP.NET IDs

2007-08-19 Thread seedy


This should only happen on databound (templated) controls.
If its a submit button or textbox ect that you have placed on the form with
the designer, or dynamically with codebehind you should have no problem
accessing it using $('#ServerID').  
I have been doing so with much success.


[EMAIL PROTECTED] wrote:
> 
> 
> "if you have an element that has runat="server" attribute you cannot
> call it directly as #loginForm  because asp.net rewrites the id to
> something different  just doa view source on your aspx page and you
> will see the renamed form cleintid "
> 
> I was wondering how to probably implement jQuery with an ASP.NET
> control considering this problem.  Or do we simply need to write out:
> 
> "ctl00_ContentPlaceHolder1_btnConfirm" to access the btnConfirm
> button?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ASP.NET-IDs-tf4292112s15494.html#a12228959
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] @import vs link

2007-08-19 Thread Rey Bango


Hi guys,

In looking at another thread about jTip, I noticed that the css file was 
including like this:


@import '/public/js/jtip/css/jtip.css';

What's the difference and/or benefit of using "@import" vs "link" to 
include a stylesheet?


Rey...


[jQuery] The Perfect Pop-up as a jQuery plugin?

2007-08-19 Thread boermans

I'm looking for some help with scoping variables used to store
references to popped-up windows.

What I have so far:
http://static.fusion.com.au/ollie/jquery/popwindow2/

is a dumbed down version of:
http://jquery.com/plugins/project/PopupWindow

I would like to incorporate some of the accessibility considerations
of:
http://www.accessify.com/features/tutorials/the-perfect-popup/

In particular the ability to close and reopen pop-ups that are already
open to ensure the pop-up is focussed. Attempting to store a reference
to the pop opened windows has had me all tangled up in the scoping of
the jquery plugin structure. This is where I'm struggling.

Where should I be storing the window reference variable so that it
remains accessible to subsequent clicks? Is it possible to create
these references dynamically - when the pop-up links are clicked?

###

What I envisaged was storing a variable for each pop window profile.
That is - popping another window will close any previously popped
window that used the same profile. In contrast popping another window
with a different profile to an already open pop window will not close
the former.

Feeling a little out of my depth...
Ollie



[jQuery] Re: @import vs link

2007-08-19 Thread boermans

Link is the more flexible option. The media and rel attributes give
you some control that @import lacks.
Generally I use import now as an organisational tool - linking in
separate CSS files from _within_ a central CSS file.
I remember years ago using the import to hide CSS from the likes of
IE3.

On Aug 20, 10:45 am, Rey Bango <[EMAIL PROTECTED]> wrote:
> What's the difference and/or benefit of using "@import" vs "link" to
> include a stylesheet?



[jQuery] Re: @import vs link

2007-08-19 Thread seedy


The link tag is html, @import is CSS.   You can use @import from within a
stylesheet (has to be the first text) to include many stylesheets with a
single  tag

Also import is not recognized by netscape 4 so it can be used to hid
stylesheets from older browsers.


Rey Bango-2 wrote:
> 
> 
> Hi guys,
> 
> In looking at another thread about jTip, I noticed that the css file was 
> including like this:
> 
> @import '/public/js/jtip/css/jtip.css';
> 
> What's the difference and/or benefit of using "@import" vs "link" to 
> include a stylesheet?
> 
> Rey...
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%40import-vs-link-tf4296227s15494.html#a12229107
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] slideUp and Interface plugin problems?

2007-08-19 Thread Faust Gertz
I am having a problem with jQuery and the interface plugin. When I 
simply use jQuery 1.1.3.1 or the latest nightly, things work find. But 
when I simply try to add ifx.js from Interface 1.2, I get problems such 
as a "double bounce" on .slideUp(). I am guessing this has to with 
ifx.js changing .animate().  See http://kliks.faustgertz.com/calendar/ 
for examples and click on the months to toggle them. Any advice?


The code that seems to be the problem is in the second function passed 
to a .toggle().


$('.label, .event', $month).fadeTo('medium', 0.5, function() {
 $month.find('.event').slideUp('medium', function() {
   $month.removeClass('display');
...
 });  
});


Text fades to 50% opacity, the .event block slides up, the .display 
class that provides a background is removed, and then the contents of 
the .event block appear again and slideUp.  It is the second coming that 
I don't understand.



Thanks in advance,

Faust

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml";>
 
   

  
  @import url(/css/master.css);

  @import url(/css/print.css);

  
  Untitled Document
  
  


  
  /* make more generic and reusable with none hardcoded classes or siblings. 
Maybe make a plugin .*/
$(document).ready(function() {
 $('.month .event').hide();
 /*$('.month .label, .month .event').fadeTo('fast', 0.5);*/
 $('.month .label, .month .event').css('opacity', 0.5);
 var toggleInProgress = false;
 var labelHover = new Object();
 labelHover.on = function() {
  if(toggleInProgress) {
   return;
  }  
  $(this).fadeTo('fast', 1);
 };
 labelHover.off = function() {
  if(toggleInProgress) {
   return;
  }  
  $(this).fadeTo('fast', .5);
 }; 
 $('.month .label').hover(labelHover.on, labelHover.off);
 $('.month .label').toggle(function() {
   if(toggleInProgress) {
return;
   }  
   $('.month .event:visible').parent().find('.label').click();
   toggleInProgress = true;
   var $label = $(this);
   $label.unbind('mouseout').unbind('mouseover').fadeTo('fast', 1);
   var $month = $label.parent();
   $month.addClass('display'); 
   $month.find('.event').slideDown('slow', function(){
 $(this).fadeTo('slow', 1);  
 toggleInProgress = false; 
   }); 
  }, function() {
   if(toggleInProgress) {
return;
   }  
   toggleInProgress = true;
   var $label = $(this);
   var $month = $label.parent();
   $('.label, .event', $month).fadeTo('medium', 0.5, function() {
 $month.find('.event').slideUp('medium', function() {
   $month.removeClass('display');
   $label.hover(labelHover.on, labelHover.off);
   toggleInProgress = false; 
 });   
   }); 
  });
});   
  
  
 
 
  

Kliks Photography

 
  About Us
  Photography
  Rates
  Questions
  Calendar
  Place an Order
  Contact
 

   



Calendar

 January >
 
  Capto patria oppeto vulpes iusto tego vereor aliquip. Blandit 
consequat pneum wisi lobortis at et abico. Utinam cogo, nisl vulpes validus qui 
in distineo.
 


 February >
 
  Capto patria oppeto vulpes iusto tego vereor aliquip. Blandit 
consequat pneum wisi lobortis at et abico. Utinam cogo, nisl vulpes validus qui 
in distineo.
  Capto patria oppeto vulpes iusto tego vereor aliquip. Blandit 
consequat pneum wisi lobortis at et abico. Utinam cogo, nisl vulpes validus qui 
in distineo.
  Capto patria oppeto vulpes iusto tego vereor aliquip. Blandit 
consequat pneum wisi lobortis at et abico. Utinam cogo, nisl vulpes validus qui 
in distineo.
  Capto patria oppeto vulpes iusto tego vereor aliquip. Blandit 
consequat pneum wisi lobortis at et abico. Utinam cogo, nisl vulpes validus qui 
in distineo.
  Capto patria oppeto vulpes iusto tego vereor aliquip. Blandit 
consequat pneum wisi lobortis at et abico. Utinam cogo, nisl vulpes validus qui 
in distineo.   
 


 March >
 
  Capto patria oppeto vulpes iusto tego vereor aliquip. Blandit 
consequat pneum wisi lobortis at et abico. Utinam cogo, nisl vulpes validus qui 
in distineo.
 


 April >
 
  Capto patria oppeto vulpes iusto tego vereor aliquip. Blandit 
consequat pneum wisi lobortis at et abico. Utinam cogo, nisl vulpes validus qui 
in distineo.
 


 May >
 
  Capto patria oppeto vulpes iusto tego vereor aliquip. Blandit 
consequat pneum wisi lobortis at et abico. Utinam cogo, nisl vulpes validus qui 
in distineo.
 


 June >
 
  Capto patria oppeto vulpes iusto tego vereor aliquip. Blandit 
consequat pneum wisi lobortis at et abico. Utinam cogo, nisl vulpes validus qui 
in distineo.
 
  

 July 

[jQuery] Re: - jqDnR R2 Released

2007-08-19 Thread Brice Burgess


Thanks for all the feedback regarding this plugin. It is apparent that the
styling needs updating in order to prevent confusion! :)

Stephen:

Stephan Beal-3 wrote:
> 
> To reproduce, simply resize the 3rd example's widget. Then move it up
> a ways and resize again, and watch the space where it originally was
> change size along with the widget.
> 
This has to do with the fact that the box is relatively positioned. If the
position is changed to absolute (which I imagine will be the case for *most*
elements to be dragged), the resizing should not effect siblings.

Rey: 
I'll include the ability to enforce minimum height/width on resizables
shortly. For now, you're best setting the overflow to auto or hidden to
prevent the contents of the resizable from overflowing the container's size.

Benjamin:
I'm relatively sure I'm using the latest dimensions.js (pulled via Google
code's web SVN -- damn I miss trac), version 1.1.2. Hopefully sometime over
the week I'll have the time to sit down & toy with the Opera "bug".

Again, thanks for all your comments, and please let me know if you have any
further questions or concern -- this plugin needs to finally be ironed out.

~ Brice






-- 
View this message in context: 
http://www.nabble.com/-ANNOUNCEjqDnR-R2-Released-tf4294803s15494.html#a12229211
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: What to do when a plugin's css gets in your way

2007-08-19 Thread Mitch

Wow that is a freaking amazing solution. Not only getting the right
css portion, but in showing me the way you use import then restyle on
the page. Very cool.

I will look into ClueTip. I like the way this coder set things up but
he did not do a good job laying out how to use it, and compared to
other plugin specialists here, he did not set up the plugin for
automatic use, I had to play with before I saw how it really worked.
Maybe ClueTip did a better job of documentation, because for me that
is as important as the plugin itself.

Oh and I am still curious how people deal with battling CSS. Firebug?

On Aug 19, 6:03 pm, Pops <[EMAIL PROTECTED]> wrote:
> Mitch,
>
> I came across the same issue with jTip until I studied it more.
>
> The global.css provided jTip is only an example.  All you really need
> here are the classes beginning with "JT_"   The CSS has an inline
> comment separating the specific JT_ classes.
>
> What I did was cut and paste these classes into a file called jTip.CSS
> file and then I do this to customized them:
>
>
>@import '/public/js/jtip/css/jtip.css';
>#JT{ background-color: lightcyan; }
>.jTip   { cursor:default;}
>#JT_close_left  { background-color: green;  color: white; }
>#JT_close_right { background-color: green;  color: yellow;}
>"
>
> ps: You may want to explore ClueTip. It has some improved ideas over
> jTip, like proper placement so it isn't cut off, delaying the popup
> until the hovering mouse is idle on the link, plus some other features
> like Sticky Popups.
>
> --
> HLS
>
> On Aug 19, 8:17 pm, Mitch <[EMAIL PROTECTED]> wrote:
>
>
>
> > What do you guys suggest when I use someone's plugin and its css
> > contains styles that alter my entire page.
>
> > I have never had this happen until I tried jTip, which is a very cool
> > tooltip plugin. It has a body style that changes its font to 62.5% of
> > an em, and that ends up shrinking all my fonts.
>
> > Mitch- Hide quoted text -
>
> - Show quoted text -



[jQuery] Re: @import vs link

2007-08-19 Thread Mitch

Check this:

   
   @import '/public/js/jtip/css/jtip.css';
   #JT{ background-color: lightcyan; }
   .jTip   { cursor:default;}
   #JT_close_left  { background-color: green;  color: white; }
   #JT_close_right { background-color: green;  color: yellow;}
   "

Its from HLS, which I dont think stands for Hue, Luminence and
Saturation, but is a gentleman's initials.

On Aug 19, 6:45 pm, Rey Bango <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> In looking at another thread about jTip, I noticed that the css file was
> including like this:
>
> @import '/public/js/jtip/css/jtip.css';
>
> What's the difference and/or benefit of using "@import" vs "link" to
> include a stylesheet?
>
> Rey...



[jQuery] Re: What to do when a plugin's css gets in your way

2007-08-19 Thread Karl Swedberg

Hi Mitch,

Feel free to check out clueTip's home page here:
http://plugins.learningjquery.com/cluetip/

I'll be moving the documentation into the template provided by Mike  
Alsup at some point. In the meantime, the documentation is pretty  
thorough, if not exactly pretty.


Be sure to check out the "Info and Demo" page. If you like the jTip's  
styles, you can apply that theme to the clueTip as well, by using  
{cluetipClass: 'jtip'}.


Lots more options available there. Let me know if you have any  
questions.



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



On Aug 19, 2007, at 11:52 PM, Mitch wrote:



Wow that is a freaking amazing solution. Not only getting the right
css portion, but in showing me the way you use import then restyle on
the page. Very cool.

I will look into ClueTip. I like the way this coder set things up but
he did not do a good job laying out how to use it, and compared to
other plugin specialists here, he did not set up the plugin for
automatic use, I had to play with before I saw how it really worked.
Maybe ClueTip did a better job of documentation, because for me that
is as important as the plugin itself.

Oh and I am still curious how people deal with battling CSS. Firebug?

On Aug 19, 6:03 pm, Pops <[EMAIL PROTECTED]> wrote:

Mitch,

I came across the same issue with jTip until I studied it more.

The global.css provided jTip is only an example.  All you really need
here are the classes beginning with "JT_"   The CSS has an inline
comment separating the specific JT_ classes.

What I did was cut and paste these classes into a file called  
jTip.CSS

file and then I do this to customized them:

   
   @import '/public/js/jtip/css/jtip.css';
   #JT{ background-color: lightcyan; }
   .jTip   { cursor:default;}
   #JT_close_left  { background-color: green;  color: white; }
   #JT_close_right { background-color: green;  color: yellow;}
   "

ps: You may want to explore ClueTip. It has some improved ideas over
jTip, like proper placement so it isn't cut off, delaying the popup
until the hovering mouse is idle on the link, plus some other  
features

like Sticky Popups.

--
HLS

On Aug 19, 8:17 pm, Mitch <[EMAIL PROTECTED]> wrote:




What do you guys suggest when I use someone's plugin and its css
contains styles that alter my entire page.


I have never had this happen until I tried jTip, which is a very  
cool
tooltip plugin. It has a body style that changes its font to  
62.5% of

an em, and that ends up shrinking all my fonts.



Mitch- Hide quoted text -


- Show quoted text -






[jQuery] Re: Avoiding invalid markup

2007-08-19 Thread Kyle

It is in fact the former. I am prepending the image legally, thus if I
were to take the source after the jQuery application, it would
validate (rather, would throw the same error).

That's a good idea to wrap it, though. It works!

Thanks,

Kyle

On Aug 19, 10:18 am, bleen <[EMAIL PROTECTED]> wrote:
> Are you saying that the markup (as it downloads form the server
> (including your JS above)) is not validating? Or your markup AFTER the
> JS has made its changes is not validating? I'm guessing its the
> former. If it is, try putting all your JS in an html comment tag. like
> this:
>
> 



[jQuery] New Plugin: Live Query (previously called Behavior)

2007-08-19 Thread Brandon Aaron
Some of you may be familiar with Behavior. It was a first attempt at
implementing a "live DOM" experience. Behavior has been rewritten from the
ground up with performance in mind and new features. It is now called Live
Query. A couple of new features are that:

* Live Queries work with attribute and class selectors
* Live Query automatically unbinds events to unmatched elements and when the
Live Query is expired
* Live Query can fire a second callback for when an element is unmatched and
when the Live Query is expired

Check out the blog post for more details:
http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/

--
Brandon Aaron


[jQuery] Re: Feature suggestion: animating through stylesheets

2007-08-19 Thread John Resig

I've re-done the original demo using jQuery's step function (dunno why
I didn't think of this before). Much improved:
http://dev.jquery.com/~john/ticket/animatetest/

--John

On 7/9/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:
>
> On 7/9/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
> > A big question in my mind is:  On a slow machine with ONE animation:  Is
> > doing it this way smoother than not?   Does CSS manipulation of a single
> > animation make it smoother?  What is the gating factor for a slow computer?
> > CPU or Ram or Video card?  Or all three?  How can one test this?
>
> On slow machines the problem is redraw speed. With the CSS method all
> the elements are lined up together, but there is still lag between
> each redraw.
>
> Since this method might be a good deal more bloated than the jquery
> animate function I also recommend not including it in the core, at
> least for the time being.
>
> ~Sean
>


[jQuery] Re: New Plugin: Live Query (previously called Behavior)

2007-08-19 Thread John Resig

This is absolutely clutch. I've been watching this plugin progress
nicely and I'm very pleased with how it's turned out. I highly
recommend that everyone give it a try.

--John

On 8/20/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> Some of you may be familiar with Behavior. It was a first attempt at
> implementing a "live DOM" experience. Behavior has been rewritten from the
> ground up with performance in mind and new features. It is now called Live
> Query. A couple of new features are that:
>
> * Live Queries work with attribute and class selectors
> * Live Query automatically unbinds events to unmatched elements and when the
> Live Query is expired
> * Live Query can fire a second callback for when an element is unmatched and
> when the Live Query is expired
>
> Check out the blog post for more details:
> http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/
>
> --
> Brandon Aaron
>


[jQuery] Re: New Plugin: Live Query (previously called Behavior)

2007-08-19 Thread Dylan Verheul

Brandon, this looks very exciting. It may even solve some issues I'm
running into in my current project.

Question: "Live Query (formally Behavior)" -- don't you mean
"formerly", or is the official name still "Behavior"?

Dylan


On 8/20/07, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> Some of you may be familiar with Behavior. It was a first attempt at
> implementing a "live DOM" experience. Behavior has been rewritten from the
> ground up with performance in mind and new features. It is now called Live
> Query. A couple of new features are that:
>
> * Live Queries work with attribute and class selectors
> * Live Query automatically unbinds events to unmatched elements and when the
> Live Query is expired
> * Live Query can fire a second callback for when an element is unmatched and
> when the Live Query is expired
>
> Check out the blog post for more details:
> http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/
>
> --
> Brandon Aaron
>


[jQuery] Re: New Plugin: Live Query (previously called Behavior)

2007-08-19 Thread Marshall Salinger


This looks very cool indeed. No more creating functions for binding 
events after ajax loads. I can't wait to use this. Great work Brandon!


-Marshall


Brandon Aaron wrote:
Some of you may be familiar with Behavior. It was a first attempt at 
implementing a "live DOM" experience. Behavior has been rewritten from 
the ground up with performance in mind and new features. It is now 
called Live Query. A couple of new features are that:


* Live Queries work with attribute and class selectors
* Live Query automatically unbinds events to unmatched elements and 
when the Live Query is expired
* Live Query can fire a second callback for when an element is 
unmatched and when the Live Query is expired


Check out the blog post for more details: 
http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/


--
Brandon Aaron




[jQuery] Re: New Plugin: Live Query (previously called Behavior)

2007-08-19 Thread SeViR


;-( wops, three months ago, I needed something like that, I have to 
programm various lines of

code plus for attaching events for the dinamic elements created.

You have made me very happy :-). I love this plugin, thanks thanks 
thanks :-D


Brandon Aaron escribió:
Some of you may be familiar with Behavior. It was a first attempt at 
implementing a "live DOM" experience. Behavior has been rewritten from 
the ground up with performance in mind and new features. It is now 
called Live Query. A couple of new features are that:


* Live Queries work with attribute and class selectors
* Live Query automatically unbinds events to unmatched elements and 
when the Live Query is expired
* Live Query can fire a second callback for when an element is 
unmatched and when the Live Query is expired


Check out the blog post for more details: 
http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/


--
Brandon Aaron



--
Best Regards,
José Francisco Rives Lirola 

SeViR CW · Computer Design
http://www.sevir.org
 
Murcia - Spain




[jQuery] Re: Feature suggestion: animating through stylesheets

2007-08-19 Thread Aaron Heimlich
Is it me, or is the DOM method a little bit faster than the CSS one (FF
2.0.0.6 Mac OS 10.4.10 Intel)? I would think that they'd both be the same
speed. Having said that, seeing the DOM move all the blocks in unison like
that is f'ing awesome!

--Aaron

On 8/20/07, John Resig <[EMAIL PROTECTED]> wrote:
>
>
> I've re-done the original demo using jQuery's step function (dunno why
> I didn't think of this before). Much improved:
> http://dev.jquery.com/~john/ticket/animatetest/
>
> --John
>
> On 7/9/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:
> >
> > On 7/9/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
> > > A big question in my mind is:  On a slow machine with ONE
> animation:  Is
> > > doing it this way smoother than not?   Does CSS manipulation of a
> single
> > > animation make it smoother?  What is the gating factor for a slow
> computer?
> > > CPU or Ram or Video card?  Or all three?  How can one test this?
> >
> > On slow machines the problem is redraw speed. With the CSS method all
> > the elements are lined up together, but there is still lag between
> > each redraw.
> >
> > Since this method might be a good deal more bloated than the jquery
> > animate function I also recommend not including it in the core, at
> > least for the time being.
> >
> > ~Sean
> >
>



-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com