[jQuery] Fix for Giva Labs linkselect plugin

2009-09-24 Thread boermans

We noticed an issue with the jquery.linkselect plugin (version 1.2.08)
today.

When the container width would cause it to be positioned off the the
screen it is repositioned incorrectly if there is no title element.

I fixed this in anchorTo function by instead adding the width of the
anchor if there is no title:

// Replace
pos.left = (pos.left - $container.outerWidth()) + $title.outerWidth();

// With
if($title.length)
{
pos.left = (pos.left - $container.outerWidth()) + $title.outerWidth
();
}
else
{
pos.left = (pos.left - $container.outerWidth()) + $anchor.outerWidth
();
}

Hope that helps someone out.
Cheers
Ollie
--
http://www.ollicle.com


[jQuery] How to combine event?

2009-09-24 Thread David .Wu

event mousedown and mouseup and mouseout actually do the same thing,
how to combine it?

$('a#cursor')
.css({cursor: 'url(hand.cur), default'})
.click(function() {
return false;
})
.mousedown(function() {
$(this).css({cursor: 'url(grab.cur), default'});
})
.mouseup(function() {
$(this).css({cursor: 'url(hand.cur), default'});
})
.mouseout(function() {
$(this).css({cursor: 'url(hand.cur), default'});
});


[jQuery] Trying to use fadein and fade out with mouseover and mouseout functions.

2009-09-24 Thread shyhockey...@gmail.com

Hi, I am  using the fade in and fade out  and mouse over and mouse
out.

What I am doing is creating a menu that fades in when the mouse if
over the users image.

The problem I run into is that when the background of the menu fades
in with the buttons which are links. I notice that if you move the
mouse over the buttons/links the menu and buttons fade out.

I have 2 elements one is the menus background and the other element is
the buttons/links on top of the background.

I have a fade out command when the mouse it off the menu background.
So I am guessing when the mouse goes over the links/buttons it acts as
if the mouse isn't no longer over the menu background element causing
a fade out effect.

What can I do to prevent  the menu fading out when the mouse is over
the buttons that are links.

I want the users to be able to put their mouses on the buttons and be
able to click on the buttons without the menu fading out but only fade
out if the mouse is not longer on the background of the menu and is
not over any of the buttons on the menus background.

I was woundering if I should do a if statement to check the conditions
which would be where the mouse is over.


If the mouse is over either the menu background meaning the menu or is
over the buttons on the menu background meaning the opitions in the
menu. Then don't do a fade out  only do a fade out if the mouse is not
over  either the buttons or the menu itself.

how   could I do this?


[jQuery] [Autocomplete]autocomplete in textarea

2009-09-24 Thread td liao

hi guys

i had used jQuery autocomplete in a textarea
i want the suggest results show in where i'm typing, not outside the
textarea.
i checked jQuery autocomplete source code, finding in line 722 is the
core code.

show: function() {
   var offset = $(input).offset();
   element.css({
   width: typeof options.width == "string" ||
options.width > 0 ?
options.width : $(input).width(),
   top: offset.top + input.offsetHeight,
   left: offset.left
}).show();

top and left are what u want to change.
but i don't know how to get my typing position and use it in the case.


[jQuery] Re: TableSorter and colspans

2009-09-24 Thread DisgruntledGoat

Hi Christian,

I've just found a bug which sounds like it's related to this issue.
You may already be aware of this but I'll post it anyway.

I have a table with two rows in the header. The first row has one cell
spanning all the columns, and the second row has a cell for each
column.

With all the default settings (i.e. nothing passed in to the
tablesorter function), the sort arrows appear on the spanned cell as
well as each of the main header cells. But when clicking any column,
the table sorts by the next column along. So if I click the spanned
cell, it sorts by the first column; if I click the 3rd cell in the
second row, it sorts by the 4th column.

I think this is because the spanned cell is now being added to the
header cell list. In an earlier version I used, it was ignored
completely, so cell 0 was the first column, now cell 0 is the header
cell, but when you click it, it sorts by what used to be cell 0, the
first column.

Hope that helps!

--
Scott.



On Sep 7, 9:45 am, Christian Bach  wrote:
> Hi Mike.
>
> Tablesorter used to support colspan until i found a bug in the
> checkCellColSpan function. I quick fixed it by removing the function called
> and forgot to update the docs.
>
> I have a new implementation on the way.
>
> Regards
> Christian
>
> 2009/9/5 Mike Alsup 
>
>
>
> > > Ive used the tablesorter alot in my projects, and Ive had the need for
> > > this as well.
> > > I found a DataTables plugin which looks like it can do colspans, but I
> > > havent tried it.
> > > I actually looked after reading your post to see if it supported the
> > > colspans now, as earlier versions didnt and I see it looks like it
> > > does.
>
> > I figured out how to get this working in my project via TableSorter's
> > textExtraction option.  Would like to understand why the docs claim to
> > support this however.
>
> --
> Christian Bach
>
> Polyester*
> Wittstocksgatan 2nb
> 11524 Stockholm, Sweden
> +46 70 443 91 90


[jQuery] Re: append and selector problem;

2009-09-24 Thread James

That's because when you bind events on elements, and you remove those
elements, and introduce new elements, they will not be binded
automatically. There are two options:
1) Re-bind the events (which is what made it work for you on your
second code)
2) Use event delegation (Google for more info)

jQuery has $.live that uses event delegation.
You can use it in your code like this:

$("tbody tr").live("click", function(){
alert("hii");
});

On Sep 24, 4:59 am, dattu  wrote:
> Hi,
>
> I am facing one problem In jquery. For easy understanding, below html
> code created.
>
> Before clicking on CHANGE label if click on 12345, I am getting
> hiii alert message.
> After clicking on CHANGE I am not getting alert message.(I am
> experting hii should come on click of 67890 also).
>
> code sample
>
> 
> 
>   http://code.jquery.com/jquery-latest.js";>
>
>   
>   $(document).ready(function(){
>   $('#change').click(function(){
>   $('#div1').empty();
>   $('#div1').append(' thead>');
>         });
> $("tbody tr").click(function(){
>                 alert("hii");
>         });
>
>   });
>   
>
> 
> 
>   
>                 CHANGE
>     
>                 
>                 
>                         TEST
>                 
>                 
>                 
>                 
>                         12345
>                 
>                 
>                         ABCD
>                 
>                 
>   
> 
> 
>
> 1) Please explain why this is not behaving as experted.
> 2) In case of NOTE (see at last) change, why it is working?
> 3) how can I slow this issue
>
> NOTE:- If i change like below it is working.
>
> $(document).ready(function(){
>   $('#change').click(function(){
>   $('#div1').empty();
>   $('#div1').append('NEW TEST thead>67890EFGHI');
>
> $("tbody tr").click(function(){
>                 alert("hii");
>         });
>
>         });
>   });


[jQuery] Re: jQuery crashing the page


Are these events being set by jQuery?
How are you setting the events? Without code or a demo page it's
pretty hard to help here.

On Sep 24, 1:37 am, Sam Doyle  wrote:
> I've got 2 pages:
>
> a current events page and a past events page
>
> the current events page loads fine as there is only about 10 events
> the past events page takes about 30 seconds to load and will crash if
> u click your mouse in the loading time
>
> The pages are near identical the only difference is the query that
> selects the events (> versus <)
>
> The page loads immediately without:
> http://ajax.googleapis.com/ajax/
> libs/jquery/1.3.2/jquery.min.js">
>
> But when i put it back in the above happens. Any ideas welcome!
>
> PC I'm using jQuery.roundedcorners.
>
> Sam


[jQuery] Re: Refresh only a section of the page


Have the radio on your top page, and your content pages loaded into a
DIV via AJAX, or use IFRAMES to display your content.
Is that what you're looking for?

On Sep 24, 2:09 am, Macovei Catalin  wrote:
> Hello,
> i am trying to use ajax for my site and i have a problem.
> I have a live radio running on my home page and the rest, and i want
> to navigate through the website without having to make the buffering
> again.
> I've searched multiple forums but no solutions.
> Can you help me?


[jQuery] Re: new to this


This Google Group is for jQuery related questions.
You should consider asking this somewhere to help with Javascript in
general.


On Sep 24, 10:44 am, mike c  wrote:
> I am new to this and trying to put some code together for a project
> for my boss. The long and short of it is that the timer for the mouse
> over needs to be longer so that the pop up text lasts for 60 seconds.
> I am not a coder and probably made a basic mistake. I have searched
> Google but keep failing and need some help from experts.  Thanks. The
> bare bones of the code looks like this;
>
> 
>  if (!document.layers&&!document.all&&!document.getElementById)
> event="test"
> function showtip(current,e,text){
>                 window.status = text;
> if (document.all||document.getElementById){
> thetitle=text.split('
') > if (thetitle.length>1){ > hetitles='' > for (i=0;i thetitles+=thetitle[i]} > > else > current.title=text} > } > > function hidetip(){ > if (document.layers) > document.tooltip.visibility="hidden" >  } >     function () { >            setTimeout(function() { >                 document.all("text"); >           }, 6); >       } > > >   name=storesku>   onMouseOver="showtip(this,event,'Help I cant code.')" >   onmouseout=hidetip() shape=RECT coords=48,57,131,73 >   alt="" src="store sku spare_files/store sku.jpg" width=880 > useMap=#storesku > border=0>

[jQuery] Re: creating parameters dynamically

You may want to do a new post with the word Tablesorter in the subject,
especially if no on chimes in after a day or two.
- Richard

On Thu, Sep 24, 2009 at 8:52 PM, Richard D. Worth  wrote:

> I'm not sure how to make this work with Tablesorter. I should've specified,
> I was just answering the question of how you create a hash from an array in
> JavaScript using jQuery's .each() and hash[key] = value syntax.
> - Richard
>
>
> On Thu, Sep 24, 2009 at 8:38 PM, Macsig  wrote:
>
>>
>> Hi Richard.
>> thanks for your reply
>> unfortunately looks like I have some trouble to make the code works.
>>
>> If I call the second options everything works fine but with yours the
>> headers are still sortable.
>>
>>$('.scrolling_table').tablesorter({ headers: h1 });
>>$('.scrolling_table').tablesorter({ headers: {0: { sorter: false },
>> 1: { sorter: false }, 2: { sorter: false }}});
>>
>>
>> Moreover, looking at tablesorter documentation I have just noticed the
>> best way to achieve my goal is using class="{sorter: false}" for the
>> header I don't want to be sortable but also in this case I have some
>> troubles. My table looks like
>>
>>
>>
>>
>> 
>> 
>> 
>>task
>>user
>>date
>>pred
>>
>>
>>
>>
>>-
>>-
>>-
>>task 1
>>joe
>>> class="item_cell">11/11/2009
>>no
>>
>>
>>-
>>-
>>-
>>task 2
>>joe
>>> class="item_cell">11/12/2009
>>no
>>
>>
>>-
>>-
>>-
>>task 4
>>mark
>>> class="item_cell">11/18/2009
>>yes
>>
>>
>>
>>
>>
>>
>> Am I missing something?
>>
>> Thanks again
>>
>>
>> Sig
>>
>>
>>
>>
>> On Sep 24, 5:15 pm, "Richard D. Worth"  wrote:
>> > function createHeaders(ary) {
>> >   var headers = {};
>> >   $(ary).each(function() {
>> > headers[this] = { sorter: false };
>> >   });
>> >   return headers;
>> >
>> > }
>> >
>> > var a1 = [0,1,2], a2 = [0,4,5,8];
>> > var h1 = createHeaders(a1), h2 = createHeaders(a2);
>> >
>> > $(this).tablesorter({ headers: h1 });
>> >
>> > $(this).tablesorter({ headers: h2 });
>> >
>> > - Richard
>> >
>> >
>> >
>> > On Thu, Sep 24, 2009 at 6:44 PM, macsig  wrote:
>> >
>> > > I know this is not strictly related to jquery but I don't know how to
>> > > make it works.
>> >
>> > > I'm working on a function that has as variable an array and for each
>> > > element I need to create a piece of code for an other function.
>> >
>> > > For instance when the array contains [0,1,2] I need to call
>> >
>> > > $(this).tablesorter({headers: {0: { sorter: false }, 1: { sorter:
>> > > false }, 2: { sorter: false }}});
>> >
>> > > and when the array contains [0,4,5,8] I need to call
>> >
>> > > $(this).tablesorter({headers: {0: { sorter: false }, 4: { sorter:
>> > > false }, 5: { sorter: false }, 8: { sorter: false }}});
>> >
>> > > How can I achieve so?
>> >
>> > > THANKS, I appreciate your help
>> >
>> > > Sig
>>
>
>


[jQuery] Re: creating parameters dynamically

I'm not sure how to make this work with Tablesorter. I should've specified,
I was just answering the question of how you create a hash from an array in
JavaScript using jQuery's .each() and hash[key] = value syntax.
- Richard

On Thu, Sep 24, 2009 at 8:38 PM, Macsig  wrote:

>
> Hi Richard.
> thanks for your reply
> unfortunately looks like I have some trouble to make the code works.
>
> If I call the second options everything works fine but with yours the
> headers are still sortable.
>
>$('.scrolling_table').tablesorter({ headers: h1 });
>$('.scrolling_table').tablesorter({ headers: {0: { sorter: false },
> 1: { sorter: false }, 2: { sorter: false }}});
>
>
> Moreover, looking at tablesorter documentation I have just noticed the
> best way to achieve my goal is using class="{sorter: false}" for the
> header I don't want to be sortable but also in this case I have some
> troubles. My table looks like
>
>
>
>
> 
> 
> 
>task
>user
>date
>pred
>
>
>
>
>-
>-
>-
>task 1
>joe
> class="item_cell">11/11/2009
>no
>
>
>-
>-
>-
>task 2
>joe
> class="item_cell">11/12/2009
>no
>
>
>-
>-
>-
>task 4
>mark
> class="item_cell">11/18/2009
>yes
>
>
>
>
>
>
> Am I missing something?
>
> Thanks again
>
>
> Sig
>
>
>
>
> On Sep 24, 5:15 pm, "Richard D. Worth"  wrote:
> > function createHeaders(ary) {
> >   var headers = {};
> >   $(ary).each(function() {
> > headers[this] = { sorter: false };
> >   });
> >   return headers;
> >
> > }
> >
> > var a1 = [0,1,2], a2 = [0,4,5,8];
> > var h1 = createHeaders(a1), h2 = createHeaders(a2);
> >
> > $(this).tablesorter({ headers: h1 });
> >
> > $(this).tablesorter({ headers: h2 });
> >
> > - Richard
> >
> >
> >
> > On Thu, Sep 24, 2009 at 6:44 PM, macsig  wrote:
> >
> > > I know this is not strictly related to jquery but I don't know how to
> > > make it works.
> >
> > > I'm working on a function that has as variable an array and for each
> > > element I need to create a piece of code for an other function.
> >
> > > For instance when the array contains [0,1,2] I need to call
> >
> > > $(this).tablesorter({headers: {0: { sorter: false }, 1: { sorter:
> > > false }, 2: { sorter: false }}});
> >
> > > and when the array contains [0,4,5,8] I need to call
> >
> > > $(this).tablesorter({headers: {0: { sorter: false }, 4: { sorter:
> > > false }, 5: { sorter: false }, 8: { sorter: false }}});
> >
> > > How can I achieve so?
> >
> > > THANKS, I appreciate your help
> >
> > > Sig
>


[jQuery] Re: creating parameters dynamically


Hi Richard,
actually I have just discovered there is a built-in way to make a
column non sortable.


Thanks for your help.


Sig

On Sep 24, 5:15 pm, "Richard D. Worth"  wrote:
> function createHeaders(ary) {
>   var headers = {};
>   $(ary).each(function() {
>     headers[this] = { sorter: false };
>   });
>   return headers;
>
> }
>
> var a1 = [0,1,2], a2 = [0,4,5,8];
> var h1 = createHeaders(a1), h2 = createHeaders(a2);
>
> $(this).tablesorter({ headers: h1 });
>
> $(this).tablesorter({ headers: h2 });
>
> - Richard
>
>
>
> On Thu, Sep 24, 2009 at 6:44 PM, macsig  wrote:
>
> > I know this is not strictly related to jquery but I don't know how to
> > make it works.
>
> > I'm working on a function that has as variable an array and for each
> > element I need to create a piece of code for an other function.
>
> > For instance when the array contains [0,1,2] I need to call
>
> > $(this).tablesorter({headers: {0: { sorter: false }, 1: { sorter:
> > false }, 2: { sorter: false }}});
>
> > and when the array contains [0,4,5,8] I need to call
>
> > $(this).tablesorter({headers: {0: { sorter: false }, 4: { sorter:
> > false }, 5: { sorter: false }, 8: { sorter: false }}});
>
> > How can I achieve so?
>
> > THANKS, I appreciate your help
>
> > Sig


[jQuery] Re: creating parameters dynamically


Hi Richard.
thanks for your reply
unfortunately looks like I have some trouble to make the code works.

If I call the second options everything works fine but with yours the
headers are still sortable.

$('.scrolling_table').tablesorter({ headers: h1 });
$('.scrolling_table').tablesorter({ headers: {0: { sorter: false },
1: { sorter: false }, 2: { sorter: false }}});


Moreover, looking at tablesorter documentation I have just noticed the
best way to achieve my goal is using class="{sorter: false}" for the
header I don't want to be sortable but also in this case I have some
troubles. My table looks like




 
 
 
task
user
date
pred




-
-
-
task 1
joe
11/11/2009
no


-
-
-
task 2
joe
11/12/2009
no


-
-
-
task 4
mark
11/18/2009
yes






Am I missing something?

Thanks again


Sig




On Sep 24, 5:15 pm, "Richard D. Worth"  wrote:
> function createHeaders(ary) {
>   var headers = {};
>   $(ary).each(function() {
>     headers[this] = { sorter: false };
>   });
>   return headers;
>
> }
>
> var a1 = [0,1,2], a2 = [0,4,5,8];
> var h1 = createHeaders(a1), h2 = createHeaders(a2);
>
> $(this).tablesorter({ headers: h1 });
>
> $(this).tablesorter({ headers: h2 });
>
> - Richard
>
>
>
> On Thu, Sep 24, 2009 at 6:44 PM, macsig  wrote:
>
> > I know this is not strictly related to jquery but I don't know how to
> > make it works.
>
> > I'm working on a function that has as variable an array and for each
> > element I need to create a piece of code for an other function.
>
> > For instance when the array contains [0,1,2] I need to call
>
> > $(this).tablesorter({headers: {0: { sorter: false }, 1: { sorter:
> > false }, 2: { sorter: false }}});
>
> > and when the array contains [0,4,5,8] I need to call
>
> > $(this).tablesorter({headers: {0: { sorter: false }, 4: { sorter:
> > false }, 5: { sorter: false }, 8: { sorter: false }}});
>
> > How can I achieve so?
>
> > THANKS, I appreciate your help
>
> > Sig


[jQuery] Re: Prev and next navigation






here's a URL utility plugin that would likely be big help. Would be
relatively easy to tie this into the Cycle API for your gallery

http://benalman.com/projects/jquery-url-utils-plugin/

look at the fragment examples 2/3 of way down "What this plugin allows
you to do"

Anush Shetty wrote:

  I am trying to a setup a jquery based navigation for my photo gallery
i.e something like facebook using hash url technique. I am using php
and mysql in the backend. Is there any example I could look at for
implementing it. The reason for using hash urls is that I would like
to have an unique url for every pic.



  






[jQuery] jquery crashes on ie6


hello,
i am a designer of a news portal www.haber7.com
we recently renewed the design of the portal and published it. but
there are too many complaints about crashing downs on ie6 and ie7, but
mostly ie6. and of course page is usually scrolling slowly as there
are many ads and javascripts running already.
i had an email from a visitor of the site including a screenshot of
the crush message from ie6. it says iexplorer has encountered a
problem bla bla and it refers to the mshtml.dll.

is there a solution for these slowing-down issues? any help will be
appreciated.

kind regards


[jQuery] new to this


I am new to this and trying to put some code together for a project
for my boss. The long and short of it is that the timer for the mouse
over needs to be longer so that the pop up text lasts for 60 seconds.
I am not a coder and probably made a basic mistake. I have searched
Google but keep failing and need some help from experts.  Thanks. The
bare bones of the code looks like this;


 if (!document.layers&&!document.all&&!document.getElementById)
event="test"
function showtip(current,e,text){
window.status = text;
if (document.all||document.getElementById){
thetitle=text.split('
') if (thetitle.length>1){ hetitles='' for (i=0;i

[jQuery] Bassistance Validation Plugin - bit of a newbie..


hi people

ive just started playing around with jquery.

ive used jqtransform to make my form pretty looking, and have
attempted to implement bassistance.de's validation plugin - everything
kind of works, apart from the fact that the validation message does
not appear visibly - if you really look, you can see the message "2
characters" underneath the text boxes.. ive set the z index to be
higher than the form too, and tried to position the error label - this
is the only css rule i have in relation to the form:

#commentForm label.error { display:inline; margin: 0 500px 0 0; z-
index:10;}

the rest of the document and code can be seen at

ameliealden.com/victory/gallery.html

some advice on how to position the error label below each text field,
plus some help on why no others are appearing, would be really really
helpful as im not sure what to touch or tweak!

thanks

emma


[jQuery] disable eager validation (validate)


I'm using a custom validation method that is doing an server-side
check of the data entered into a form to determine uniqueness before
the form is submitted.  The eager validation, while useful for client-
side validation, introduces a certain amount of lag into my form which
I'd like to avoid.  Is there any way to turn off the eager validation
after the first attempt at submission (i.e. the form only gets
validated whenever the user presses the submit button)?  Thanks in
advance for any advice.


[jQuery] Superfish plug-in mouse out animation


Hello,

I was wondering if there is a way to animate the menu UL list up on
mouse out.  I have it so the height shows when the mouse goes over the
first li link, but I would like it to return up in the same manner.
Any suggestions?

Thank you


[jQuery] Re: creating parameters dynamically

function createHeaders(ary) {
  var headers = {};
  $(ary).each(function() {
headers[this] = { sorter: false };
  });
  return headers;
}

var a1 = [0,1,2], a2 = [0,4,5,8];
var h1 = createHeaders(a1), h2 = createHeaders(a2);

$(this).tablesorter({ headers: h1 });

$(this).tablesorter({ headers: h2 });

- Richard

On Thu, Sep 24, 2009 at 6:44 PM, macsig  wrote:

>
> I know this is not strictly related to jquery but I don't know how to
> make it works.
>
> I'm working on a function that has as variable an array and for each
> element I need to create a piece of code for an other function.
>
> For instance when the array contains [0,1,2] I need to call
>
> $(this).tablesorter({headers: {0: { sorter: false }, 1: { sorter:
> false }, 2: { sorter: false }}});
>
>
> and when the array contains [0,4,5,8] I need to call
>
> $(this).tablesorter({headers: {0: { sorter: false }, 4: { sorter:
> false }, 5: { sorter: false }, 8: { sorter: false }}});
>
>
> How can I achieve so?
>
> THANKS, I appreciate your help
>
> Sig


[jQuery] Re: ultimate submenu(please help me)






I tried a demo of 8 sub levels with superfish just to see what
happened, only limitiation was page space ( which can also be overcome
with some onBeforeShow functions)

Shawn wrote:

Superfish doesn't do the trick?
http://users.tpg.com.au/j_birch/plugins/superfish/#examples
  
  
They show the JS code to make that work.  View Source on the page and
you find the menus are just lists (ul's).  So if you need more complex,
just build the nested lists as needed.  If you need Ajaxified, just
update the lists as needed.  (though you may need to re-apply the
superfish command then).
  
  
Shawn
  
  
hamed7 wrote:
  
  hi

i want create ultimate submenu and support multilevel for example like

this:

--

1:

1-1


2:

2-1

2-2-1

2-3-1-1

2-3-2-1

2-4-1-1-1

2-5-1-1


3:

3-1-1-1


4

---

i need some idea or some sourcecode(ajax sourcecode is "better" than

none ajax)

*please help me this is important for me very much.

  
  






[jQuery] Re: tab load and dequeue

I couldn't *quite* tell from your message, but if you're using the jQuery UI
Tabs plugin (http://jqueryui.com/demos/tabs/), please post your question to
the jQuery UI list:
http://groups.google.com/group/jquery-ui

Otherwise, please specify which tab plugin you're using, for the right help
here. Thanks.

- Richard

On Thu, Sep 24, 2009 at 5:22 PM, richajax  wrote:

>
>
> Hi guys,
>
> I am relatively new to jquery and using jquery tab to one of the
> page.
> The tab contains 3 tab, and each tab contains pretty heavy dom
> instead.
> When I toggle the tab, I noticed about a 2 second delay, and wondered
> why there is such a delay.
> so.. run the profiler in the IE developer tool, and noticed that most
> of the bottleneck was on dequeue in load function of the ui.tab.  I
> looked at what it does, and was bit confusing why
> element.dequeue("tabs") causes such a delay ?
>
> Is this general limitation of tab.ui ?? can it be simple show, and
> hide tabs - I believe this would be bit more faster ??
>
> Richard K


[jQuery] Re: Is there an onChange method?


Anyone?

Here's what I'm trying to do.

Right now, I have a form in a lightbox.  Whenever the form is
submitted with errors, the lightbox will expand to show the form with
the errors.  Using the onSubmitHandler, I get the size of the new form
and expand the lightbox.

When a form entry is then fulfilled properly, the error message
disappears, but the form/lightbox stays the same size.  I'd like to
shrink the lightbox each time a form field is validated.

What API function can I call when a field goes from invalid to valid?

thanks!


On Sep 18, 4:47 pm, Loony2nz  wrote:
> huh?  You lost me there.
>
> On Sep 17, 5:55 pm, lanxiazhi  wrote:
>
> > you code defined when to enable,disable a button/field,so add the code
> > there.


[jQuery] Re: Validate Text Field onblur (Bassistance Validation Plugin)


do you have an example of this somehwere?  I think I could use this
for upcoming forms I have in my pipeline.

Thanks!

On Sep 1, 10:33 am, Dave Buchholz - I-CRE8  wrote:
> Got it, this code onfocusout: function(element) { this.element
> (element); }, gives me what I am looking for
>
> Dave Buchholz


[jQuery] Re: ultimate submenu(please help me)



Superfish doesn't do the trick? 
http://users.tpg.com.au/j_birch/plugins/superfish/#examples


They show the JS code to make that work.  View Source on the page and 
you find the menus are just lists (ul's).  So if you need more complex, 
just build the nested lists as needed.  If you need Ajaxified, just 
update the lists as needed.  (though you may need to re-apply the 
superfish command then).


Shawn

hamed7 wrote:

hi
i want create ultimate submenu and support multilevel for example like
this:
--
1:
1-1

2:
2-1
2-2-1
2-3-1-1
2-3-2-1
2-4-1-1-1
2-5-1-1

3:
3-1-1-1

4
---
i need some idea or some sourcecode(ajax sourcecode is "better" than
none ajax)
*please help me this is important for me very much.


[jQuery] Prev and next navigation


I am trying to a setup a jquery based navigation for my photo gallery
i.e something like facebook using hash url technique. I am using php
and mysql in the backend. Is there any example I could look at for
implementing it. The reason for using hash urls is that I would like
to have an unique url for every pic.



-- 
Sent from my mobile device

Anush,
Team Gluster,
http://gluster.com


[jQuery] ultimate submenu(please help me)


hi
i want create ultimate submenu and support multilevel for example like
this:
--
1:
1-1

2:
2-1
2-2-1
2-3-1-1
2-3-2-1
2-4-1-1-1
2-5-1-1

3:
3-1-1-1

4
---
i need some idea or some sourcecode(ajax sourcecode is "better" than
none ajax)
*please help me this is important for me very much.


[jQuery] Re: Jquery and Pop up blockers


What do they call those windows that open up without any browser
controls?

Thanks

On Sep 24, 8:33 am, Mike McNally  wrote:
> If you're not popping up new browser windows then you shouldn't have
> to worry about popup blockers, and it has nothing to do with what
> Javascript library you're using.
>
> On Wed, Sep 23, 2009 at 8:40 PM, SEMMatt2  wrote:
>
> > Does Jquery perform better or worse than other Java library with
> > regard to not triggering pop up blockers?
>
> > Thank you.
>
> --
> Turtle, turtle, on the ground,
> Pink and shiny, turn around.


[jQuery] creating parameters dynamically


I know this is not strictly related to jquery but I don't know how to
make it works.

I'm working on a function that has as variable an array and for each
element I need to create a piece of code for an other function.

For instance when the array contains [0,1,2] I need to call

$(this).tablesorter({headers: {0: { sorter: false }, 1: { sorter:
false }, 2: { sorter: false }}});


and when the array contains [0,4,5,8] I need to call

$(this).tablesorter({headers: {0: { sorter: false }, 4: { sorter:
false }, 5: { sorter: false }, 8: { sorter: false }}});


How can I achieve so?

THANKS, I appreciate your help

Sig


[jQuery] Re: Unlock Documentation



Sure.  I am totally new to jQ, so probably a food candidate to answer  
some of these.


http://docs.jquery.com/Plugins/Validation/validate
That through me for a loop, is this an internal feature built into jQ,  
or something I need to reference as a plugin?  I can not find an  
official answer to this.  (thank you #jquery, I am clear on this now)


It looks like there is a lot of data here:
http://bassistance.de/jquery-plugins/jquery-plugin-validation/ and  
that MS is hosting the files, but it is not at all clear to me if this  
is officially supported.


I do not want to go into a lot of detail on that one... I used the  
"milk" demo as a learning base, but comparing the way that code is  
done, to the way the docs show it, is different enough that I was  
confused.  The docs do not explain why the demo is done one way, and  
the docs illustrate another.  This could just be me, not understanding  
enough of this.  So forgive me if I am way off base.


http://docs.jquery.com/Events/keypress
I spent a lot of time trying to get something like the above to work  
reliably.  The demo does not work with the delete key.  It is not  
clear if that is expected behavior, or a bug.


Unfortunately, I would have to go through each function to remember  
where I ran into a little glitch.  There are a good deal of little  
things like this that I run into:

http://docs.jquery.com/Effects/hide
I am on the demo part for hide() and click on "Click to hide me too",  
the page jumps and then "Hiya.Such interesting text, eh?" shows up.   
That does not seem like a good hide example to me.  At least, not  
distilled down to the core example that I may want to see in order to  
understand what it does.  Looking at the source of the demo, I do not  
really understand, we have a click that creates a button, and then a  
button that does the hiding.


Duh, ok, I get it, the page jumped, and I was now in a different  
demo.  I am on a laptop, so this may not be a perfect case for your to  
replicate.  Though this is very illustrative of the type of confusion  
I run into at times.


Loving jQ, and this is in no way a knock on it, and my post was mostly  
in regards to the form validation stuff, which I do feel the docs need  
worked over.  The rest was more a comment about the OP stating that  
the docs were not wiki style editable, which you have proven to not be  
the case.  Thank you.

--
Scott * If you contact me off list replace talklists@ with scott@ *

On Sep 24, 2009, at 1:48 AM, Jörn Zaefferer wrote:



As Karl mentioned, users registered for more then 24h can edit all
pages, with just a few exceptions, like the wiki homepage and the
About page.

So, could you guys be a bit more specific with your critique of
existing documentation?

Jörn

On Thu, Sep 24, 2009 at 7:57 AM, Scott Haneda   
wrote:


Wow, I thought I was the only one.  Has anyone looked at the form  
validation

docs?  I thought it was a wiki style though?  No one can edit?
--
Scott * If you contact me off list replace talklists@ with scott@ *

On Sep 23, 2009, at 9:21 PM, rickoshay wrote:

The documentation is going to remain in its sorry state if they do  
not
unlock it and allow competent technical writers to update it.  
There is

no excuse, for example, for not describing the copy/move behavior of
the append function. One in a mountain of necessary documentation
updates.






[jQuery] Re: Auto close dialog after 5 seconds ?






within the event that opens the dialog you could include a timeout for
close :

setTimeout($('dialog').dialog("close"),5000);

spstieng wrote:

  Hi. I'm using jQuery.dialog and I'm wondering if it's possible to auto
close it after e.g. 5 seconds.

  






[jQuery] tab load and dequeue



Hi guys,

I am relatively new to jquery and using jquery tab to one of the
page.
The tab contains 3 tab, and each tab contains pretty heavy dom
instead.
When I toggle the tab, I noticed about a 2 second delay, and wondered
why there is such a delay.
so.. run the profiler in the IE developer tool, and noticed that most
of the bottleneck was on dequeue in load function of the ui.tab.  I
looked at what it does, and was bit confusing why
element.dequeue("tabs") causes such a delay ?

Is this general limitation of tab.ui ?? can it be simple show, and
hide tabs - I believe this would be bit more faster ??

Richard K


[jQuery] Auto close dialog after 5 seconds ?


Hi. I'm using jQuery.dialog and I'm wondering if it's possible to auto
close it after e.g. 5 seconds.


[jQuery] Re: Add content

On Thu, Sep 24, 2009 at 2:03 PM, a1anm  wrote:

>
> Hi,
>
> I have an unordered list and I would like to use Jquery to add some
> 's to it.
>
> How do I do this?
>
> Thanks!


http://docs.jquery.com/Manipulation/append

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Add content


Hi,

I have an unordered list and I would like to use Jquery to add some
's to it.

How do I do this?

Thanks!


[jQuery] Re: IE: Cursor still displays hourglass symbol after unblocking


> Yes, same problem I posted yesterday... funny we both hit it this
> week.   hopefully someone can help??  I know the author of blockUI
> says he monitors this forum...


Will take a look at this tonight.  Thanks for the reminder.

Mike


[jQuery] Re: Using addClass to Highlight Errors



On Sep 24, 12:26 pm, Bertilo Wennergren  wrote:
> s.ross wrote:
> > I have what I'm certain amounts to a CSS misunderstanding on my part.
> > Here's the reduced problem:
>
> > CSS
>
> > input[type='text'], textarea {
> >   background-color: #2c2c2c;
> >   color: white; }
>
> > .warning {
> >   background-color: "#851728"; }
>
> > .error {
> >   background-color: "#8D580F"; }
>
> > HTML
>
> >   
> >     
> >   
>
> > jQuery
>
> >   var title = jQuery("#title");
> >   title.addClass('error');
>
> > The problem: The addClass does not affect the styling of #title.
> > Firebug shows .error, but as an empty selector.
>
> Indeed. Lose the quotation marks in the CSS:
>
>   .warning {
>     background-color: #851728; }
>
>   .error {
>     background-color: #8D580F; }
>
> But it still won't work. Those rules are too weak.
> The basic rule has greater specificity, and wins.
>
> If you change the rules to this, they will be stronger,
> and win out:
>
>   input.warning {
>     background-color: #851728; }
>
>   input.error {
>     background-color: #8D580F; }
>
> This will also work:
>
> body .warning {
>     background-color: #851728; }
>
> body .error {
>     background-color: #8D580F; }
>
> > Any hints are appreciated. And, BTW, is this an appropriate way to
> > flag errors -- by adding or removing a class?
>
> It's a very good way indeed. I use it all the time.
>
> --
> Bertilo Wennergren 

Thanks so much. I knew it had to do with specificity, but it wasn't
clear what the fix was. CSS blindness :)


[jQuery] Re: Using addClass to Highlight Errors



s.ross wrote:


I have what I'm certain amounts to a CSS misunderstanding on my part.
Here's the reduced problem:

CSS

input[type='text'], textarea {
  background-color: #2c2c2c;
  color: white; }

.warning {
  background-color: "#851728"; }

.error {
  background-color: "#8D580F"; }

HTML

  

  

jQuery

  var title = jQuery("#title");
  title.addClass('error');

The problem: The addClass does not affect the styling of #title.
Firebug shows .error, but as an empty selector.


Indeed. Lose the quotation marks in the CSS:

 .warning {
   background-color: #851728; }

 .error {
   background-color: #8D580F; }

But it still won't work. Those rules are too weak.
The basic rule has greater specificity, and wins.

If you change the rules to this, they will be stronger,
and win out:

 input.warning {
   background-color: #851728; }

 input.error {
   background-color: #8D580F; }

This will also work:

body .warning {
   background-color: #851728; }

body .error {
   background-color: #8D580F; }


Any hints are appreciated. And, BTW, is this an appropriate way to
flag errors -- by adding or removing a class?


It's a very good way indeed. I use it all the time.

--
Bertilo Wennergren 


[jQuery] Re: Deactivating parent link with JQuery


Ok, I have another question that's related to the first.

I need to highlight *only* the top-parent item (the same one I just
ran 'return false;' on) with the class 'nav-selected'.

This is the code that's being generated by the CMS I'm working with
when I click on Link 3a:


Link 1
Link 2
Link 3

Link 3a
Link 3b
Link 3c


Link 4


I've got this:

if($("#nav li:first").hasClass("nav-path-selected").siblings("a"))
  // Add nav-selected class to parent li with children
  $(".nav-path-selected").addClass("nav-selected");
};

But it's not working for me. I'm *only* trying to affect the parent
 of the list that has a child  active in it.

Do you know how I can do that? Thanks for all your help so far, really
is appreciated.

osu



On Sep 24, 8:18 pm, osu  wrote:
> That's perfect, thanks for that - the second example works a treat.
>
> osu
>
> On Sep 24, 7:10 pm, Andi23  wrote:
>
> > In that case, you can just remove the href attribute of the link(s):
> > $("li ul").siblings("a").removeAttr("href");
>
> > or, if you want to leave in the href attribute for future use?, you
> > can do this:
> > $("li ul").siblings("a").click(function(){
> >     return false;
>
> > });
>
> > good luck-


[jQuery] Re: Multiple Links, Find which one was clicked?


Awesome, I've never heard of or used live() before. Seems handy!
Thanks!

On Sep 24, 1:07 pm, Charlie Griefer  wrote:
> Ah, yeah.  I should have checked to see if you were on 1.3.
>
> Assuming you can move up to 1.3, you can use the live() method (now
> built-in).
>
> I think you'd be able to get by changing your first line to:
>
> $('#pending').live('click', function({
>
>
>
>
>
> On Thu, Sep 24, 2009 at 12:05 PM, Steven  wrote:
>
> > I was running on 1.2 for some reason. :( Anyway, it works perfectly on
> > static pages, but when I load the table in via Ajax none of the links
> > are bound. I'm doing:
> >        // Click events to load requests
> >        $('#pending').click(function(){
> >                $('#list').hide(600).load('list.php',{type:
> > 'pending'}).show(600);
> >                $('#description').html(pending);
> >        });
> > To load the tables.
>
> > On Sep 24, 12:59 pm, Charlie Griefer 
> > wrote:
> > > Steven:
>
> > > It seems to be working here (quick sample thrown together):
>
> > >http://charlie.griefer.com/getRowID.html
>
> > > ?
>
> > > On Thu, Sep 24, 2009 at 11:55 AM, Steven  wrote:
>
> > > > I cannot seem to get that to work, although it does make sense. I'm
> > > > using Ajax to load the tables in; I don't know if that is the cause. I
> > > > did try it on a static page and it still did nothing though.
>
> > > > On Sep 24, 12:36 pm, Charlie Griefer 
> > > > wrote:
> > > > > $('a.accept').click(function() {
> > > > >     alert($(this).closest('tr').attr('id'));
>
> > > > > --
> > > > > Charlie Grieferhttp://charlie.griefer.com/
>
> > > > > I have failed as much as I have succeeded. But I love my life. I love
> > my
> > > > > wife. And I wish you my kind of success.
>
> > > --
> > > Charlie Grieferhttp://charlie.griefer.com/
>
> > > I have failed as much as I have succeeded. But I love my life. I love my
> > > wife. And I wish you my kind of success.
>
> --
> Charlie Grieferhttp://charlie.griefer.com/
>
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.


[jQuery] Using addClass to Highlight Errors


I have what I'm certain amounts to a CSS misunderstanding on my part.
Here's the reduced problem:

CSS

input[type='text'], textarea {
  background-color: #2c2c2c;
  color: white; }

.warning {
  background-color: "#851728"; }

.error {
  background-color: "#8D580F"; }

HTML

  

  

jQuery

  var title = jQuery("#title");
  title.addClass('error');

The problem: The addClass does not affect the styling of #title.
Firebug shows .error, but as an empty selector.

Any hints are appreciated. And, BTW, is this an appropriate way to
flag errors -- by adding or removing a class?


[jQuery] Re: Multiple Links, Find which one was clicked?

Ah, yeah.  I should have checked to see if you were on 1.3.

Assuming you can move up to 1.3, you can use the live() method (now
built-in).

I think you'd be able to get by changing your first line to:

$('#pending').live('click', function({
>
>

On Thu, Sep 24, 2009 at 12:05 PM, Steven  wrote:

>
> I was running on 1.2 for some reason. :( Anyway, it works perfectly on
> static pages, but when I load the table in via Ajax none of the links
> are bound. I'm doing:
>// Click events to load requests
>$('#pending').click(function(){
>$('#list').hide(600).load('list.php',{type:
> 'pending'}).show(600);
>$('#description').html(pending);
>});
> To load the tables.
>
> On Sep 24, 12:59 pm, Charlie Griefer 
> wrote:
> > Steven:
> >
> > It seems to be working here (quick sample thrown together):
> >
> > http://charlie.griefer.com/getRowID.html
> >
> > ?
> >
> >
> >
> > On Thu, Sep 24, 2009 at 11:55 AM, Steven  wrote:
> >
> > > I cannot seem to get that to work, although it does make sense. I'm
> > > using Ajax to load the tables in; I don't know if that is the cause. I
> > > did try it on a static page and it still did nothing though.
> >
> > > On Sep 24, 12:36 pm, Charlie Griefer 
> > > wrote:
> > > > $('a.accept').click(function() {
> > > > alert($(this).closest('tr').attr('id'));
> >
> > > > --
> > > > Charlie Grieferhttp://charlie.griefer.com/
> >
> > > > I have failed as much as I have succeeded. But I love my life. I love
> my
> > > > wife. And I wish you my kind of success.
> >
> > --
> > Charlie Grieferhttp://charlie.griefer.com/
> >
> > I have failed as much as I have succeeded. But I love my life. I love my
> > wife. And I wish you my kind of success.
>



-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: Multiple Links, Find which one was clicked?


I was running on 1.2 for some reason. :( Anyway, it works perfectly on
static pages, but when I load the table in via Ajax none of the links
are bound. I'm doing:
// Click events to load requests
$('#pending').click(function(){
$('#list').hide(600).load('list.php',{type: 
'pending'}).show(600);
$('#description').html(pending);
});
To load the tables.

On Sep 24, 12:59 pm, Charlie Griefer 
wrote:
> Steven:
>
> It seems to be working here (quick sample thrown together):
>
> http://charlie.griefer.com/getRowID.html
>
> ?
>
>
>
> On Thu, Sep 24, 2009 at 11:55 AM, Steven  wrote:
>
> > I cannot seem to get that to work, although it does make sense. I'm
> > using Ajax to load the tables in; I don't know if that is the cause. I
> > did try it on a static page and it still did nothing though.
>
> > On Sep 24, 12:36 pm, Charlie Griefer 
> > wrote:
> > > $('a.accept').click(function() {
> > >     alert($(this).closest('tr').attr('id'));
>
> > > --
> > > Charlie Grieferhttp://charlie.griefer.com/
>
> > > I have failed as much as I have succeeded. But I love my life. I love my
> > > wife. And I wish you my kind of success.
>
> --
> Charlie Grieferhttp://charlie.griefer.com/
>
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.


[jQuery] Re: $(':target') and $(location.hash)

jQuery does not support :target. The only reason why it works in Firefox 3.5
is that it provides a native querySelectorAll method. We would have to have
an implementation that works in other browser (FF 3.0, IE 8, etc.) and we
don't have that right now. You're welcome to file a ticket asking for
:target.

--John


On Thu, Sep 24, 2009 at 2:41 PM, Jack Bates  wrote:

>
> $(':target') works in Firefox 3.5, but not Firefox 3.0 and some other
> browsers,
>
> http://www.sfu.ca/~jdbates/tmp/qubit/200909231/#aaa
>
> ^ in Firefox 3.5, $(':target') selects just the element with id="aaa",
> so this element appears blue while the other appears red
>
> In Firefox 3.0 and some other browsers, $(':target') seems to select
> all elements? so they all appear blue
>
> $(location.hash) works in Firefox 3.5 and 3.0,
>
> http://www.sfu.ca/~jdbates/tmp/qubit/200909232/#aaa
>
> ^ in Firefox 3.5 and 3.0, $(location.hash) selects just the element
> with id="aaa", so this element appears blue while the other appears
> red
>
> Is the inconsistent behavior of $(':target') in Firefox 3.5 and 3.0 a
> bug in jQuery? May I open a ticket?


[jQuery] Re: Multiple Links, Find which one was clicked?

Steven:

It seems to be working here (quick sample thrown together):

http://charlie.griefer.com/getRowID.html

?

On Thu, Sep 24, 2009 at 11:55 AM, Steven  wrote:

>
> I cannot seem to get that to work, although it does make sense. I'm
> using Ajax to load the tables in; I don't know if that is the cause. I
> did try it on a static page and it still did nothing though.
>
> On Sep 24, 12:36 pm, Charlie Griefer 
> wrote:
> > $('a.accept').click(function() {
> > alert($(this).closest('tr').attr('id'));
> >
> > --
> > Charlie Grieferhttp://charlie.griefer.com/
> >
> > I have failed as much as I have succeeded. But I love my life. I love my
> > wife. And I wish you my kind of success.
>



-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: Multiple Links, Find which one was clicked?


I cannot seem to get that to work, although it does make sense. I'm
using Ajax to load the tables in; I don't know if that is the cause. I
did try it on a static page and it still did nothing though.

On Sep 24, 12:36 pm, Charlie Griefer 
wrote:
> $('a.accept').click(function() {
>     alert($(this).closest('tr').attr('id'));
>
> --
> Charlie Grieferhttp://charlie.griefer.com/
>
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.


[jQuery] $(':target') and $(location.hash)


$(':target') works in Firefox 3.5, but not Firefox 3.0 and some other
browsers,

http://www.sfu.ca/~jdbates/tmp/qubit/200909231/#aaa

^ in Firefox 3.5, $(':target') selects just the element with id="aaa",
so this element appears blue while the other appears red

In Firefox 3.0 and some other browsers, $(':target') seems to select
all elements? so they all appear blue

$(location.hash) works in Firefox 3.5 and 3.0,

http://www.sfu.ca/~jdbates/tmp/qubit/200909232/#aaa

^ in Firefox 3.5 and 3.0, $(location.hash) selects just the element
with id="aaa", so this element appears blue while the other appears
red

Is the inconsistent behavior of $(':target') in Firefox 3.5 and 3.0 a
bug in jQuery? May I open a ticket?


[jQuery] Re: Multiple Links, Find which one was clicked?

$('a.accept').click(function() {
alert($(this).closest('tr').attr('id'));
});

On Thu, Sep 24, 2009 at 11:22 AM, Steven  wrote:

>
> I have a table that looks something like this:
>
> 
> Name
> E-Mail
> Accept -  class="deny">Deny
> 
>
> With multiple rows. Each row has a unique ID (numerical). I need to be
> able to click on an a.accept, find WHICH one was clicked (which row it
> is in), and get the ID of that row. I've been looking around and I
> found parent(), but I'm not sure how I can specifically get which
> accept link was clicked.
>
> Can anyone help?




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: XHTML or HTML when creating elements?

On Thu, Sep 24, 2009 at 1:36 PM, Bertilo Wennergren wrote:

>
> The question about "" arose when I was demonstrating
> how the same inline JS example is supposed to look like in HTML
> and in XHTML. When I was changing one version from it's XHTML
> incarnation into an HTML incarnation, removing all the
> ending slashes from "meta" elements etc., I suddenly stopped
> at the included jQuery code that happend to have a piece
> of '.html(" whatever...")' in it, suddenly not knowing
> if I'm supposed to remove that slash or not. I really did not
> know - since I'm quite new to jQuery (being in the process of
> converting from Prototype...). So I had to ask. Sorry about
> all the hairs being split in the process!


Not at all. I think it was a fruitful discussion.

- Richard


[jQuery] Multiple Links, Find which one was clicked?


I have a table that looks something like this:


 Name
 E-Mail
 Accept - Deny


With multiple rows. Each row has a unique ID (numerical). I need to be
able to click on an a.accept, find WHICH one was clicked (which row it
is in), and get the ID of that row. I've been looking around and I
found parent(), but I'm not sure how I can specifically get which
accept link was clicked.

Can anyone help?


[jQuery] Re: IE: Cursor still displays hourglass symbol after unblocking


Yes, same problem I posted yesterday... funny we both hit it this
week.   hopefully someone can help??  I know the author of blockUI
says he monitors this forum...

http://groups.google.com/group/jquery-en/browse_thread/thread/9ea1cad2f7bc2535/9edbec1ce17d17f4?hl=en&lnk=gst&q=hourglass#9edbec1ce17d17f4


[jQuery] Re: Deactivating parent link with JQuery


That's perfect, thanks for that - the second example works a treat.

osu


On Sep 24, 7:10 pm, Andi23  wrote:
> In that case, you can just remove the href attribute of the link(s):
> $("li ul").siblings("a").removeAttr("href");
>
> or, if you want to leave in the href attribute for future use?, you
> can do this:
> $("li ul").siblings("a").click(function(){
>     return false;
>
> });
>
> good luck-


[jQuery] Trouble with backgroundPosition Plugin


Having some trouble with this plugin.  I've tried in both IE8 and FF3,
but it doesn't seem to work.

Basically the background position isn't moving...

the function toArray(strg) is suppose to return the following

return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];

this is the line where I'm getting an error code.  The values res[2]
and res[4] are coming back as NaN.  I'm not sure what these values
represent, or why they are Null.

I'm calling the backgroundPosition like this:

$('#nav li')
.css({backgroundPosition: "-150px 0px"})
.mouseover(function(){
$(this).stop().animate(
{backgroundPosition: "300px 
0px" },
{duration:200})
});


my css reads:

#nav li {
background:url(../gfx/btn_navbg.jpg) 0px 0px;

float:right;
min-width: 100px;
max-width: 150px;
margin:0;
padding:0;
text-align:center;
}


Any help would be much appreciated.


[jQuery] Re: Execute jQuery from links


That should work in theory, but your structure is wrong.

If you do something like this:
Will this work?
you will see that it works when you click it.

The javascript: protocol is not necessary, but it won't break anything
if you leave it in.


[jQuery] Re: XHTML or HTML when creating elements?



Richard D. Worth wrote:


On Thu, Sep 24, 2009 at 12:53 PM, Bertilo Wennergren wrote:


Richard D. Worth wrote:

 Best practice, valid HTML, and compatible with XHTML would be

$('#whatever').html('');
$('#whatever').html('');
$('#whatever').html('');


Well, not quite "valid" HTML...



quite valid. See in the below paragraph "That means that '' is valid"


Yes, valid, but valid code for ">", not for "".
Splitting hairs, I know...


If you use "" in an HTML 4.01 page, the validator at
"w3.org" gives a warning with the following explanation:

 The sequence  can be interpreted in at least two different
 ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict,
 the '/' terminates the tag '). However, since
 many browsers don't interpret it this way, even in the presence of an
 HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure
 HTML documents and reserve its use solely for those written in XHTML.

That means that "" is valid, but it does not mean what
it was supposed to mean (in HTML 4.01). It means ">"!



Having to ignore this warning is a pain, and that's remedied by HTML5. As I
posted previously, in HTML5 it is allowed (not recommended nor required)
because it's in such common use for compatibility with XHTML.


Quite welcome.


Still, it's not likely that any browser will actually
produce ">" "from $('#whatever').html('')".
But we're talking "best practices" here.



One best practice I have is that any (X)HTML I write should require as
little modification as possible to be made one or the other. The HTML5 spec
and FAQ give me confidence that no useful browser or html parser will do
"the wrong thing" with  parsed as text/html,
so it's worth the
potential ease of migration to/from XHTML. If nothing else, it's a best
practice that allows one to read and write HTML and XHTML without having to
remember as much.


Indeed.

The question about "" arose when I was demonstrating
how the same inline JS example is supposed to look like in HTML
and in XHTML. When I was changing one version from it's XHTML
incarnation into an HTML incarnation, removing all the
ending slashes from "meta" elements etc., I suddenly stopped
at the included jQuery code that happend to have a piece
of '.html(" whatever...")' in it, suddenly not knowing
if I'm supposed to remove that slash or not. I really did not
know - since I'm quite new to jQuery (being in the process of
converting from Prototype...). So I had to ask. Sorry about
all the hairs being split in the process!

--
Bertilo Wennergren 


[jQuery] Re: XHTML or HTML when creating elements?

On Thu, Sep 24, 2009 at 12:53 PM, Bertilo Wennergren wrote:

>
> Richard D. Worth wrote:
>
>  Best practice, valid HTML, and compatible with XHTML would be
>> $('#whatever').html('');
>> $('#whatever').html('');
>> $('#whatever').html('');
>>
>
> Well, not quite "valid" HTML...
>

quite valid. See in the below paragraph "That means that '' is valid"


>
> If you use "" in an HTML 4.01 page, the validator at
> "w3.org" gives a warning with the following explanation:
>
>  The sequence  can be interpreted in at least two different
>  ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict,
>  the '/' terminates the tag '). However, since
>  many browsers don't interpret it this way, even in the presence of an
>  HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure
>  HTML documents and reserve its use solely for those written in XHTML.
>
> That means that "" is valid, but it does not mean what
> it was supposed to mean (in HTML 4.01). It means ">"!
>

Having to ignore this warning is a pain, and that's remedied by HTML5. As I
posted previously, in HTML5 it is allowed (not recommended nor required)
because it's in such common use for compatibility with XHTML.


> Still, it's not likely that any browser will actually
> produce ">" "from $('#whatever').html('')".
> But we're talking "best practices" here.


One best practice I have is that any (X)HTML I write should require as
little modification as possible to be made one or the other. The HTML5 spec
and FAQ give me confidence that no useful browser or html parser will do
"the wrong thing" with  parsed as text/html, so it's worth the
potential ease of migration to/from XHTML. If nothing else, it's a best
practice that allows one to read and write HTML and XHTML without having to
remember as much.

- Richard


[jQuery] Re: Changing a class name without clicking


Hi there,
You say you want to do this by calling a function, not by clicking.
But let me ask you something: How are you going to call the function?
In other words, when do you want this class change to happen?  Do you
want it to happen as soon as the page loads?  Do you want it to happen
10 seconds after the page loads?  Do you want it to happen when you
mouse over a little red button that says "Mouse over me to change the
class now"?  I can't help you without this information.
Andi


[jQuery] Re: Deactivating parent link with JQuery


In that case, you can just remove the href attribute of the link(s):
$("li ul").siblings("a").removeAttr("href");

or, if you want to leave in the href attribute for future use?, you
can do this:
$("li ul").siblings("a").click(function(){
return false;
});

good luck-


[jQuery] Re: Changing a class name without clicking


Thanks for answering Jon.
I'm a newbie I'm afraid .. so you mean something like this:

$('.unselected').ready(function(){

   $('.selected').attr('class','unselected');
   $(this).attr('class','selected');


});


Thanks again


[jQuery] Re: Way to "convert" DOM event to jQuery event?


On Thu, Sep 24, 2009 at 12:10 PM, Kevin Dalman  wrote:
>
> If you need data for multiple fields, then a 3rd option is to create a
> single hash/data object for the page and writing all your data into
> that. This makes your data easy to read and debug, and is highly
> efficient because you don't have to 'parse' anything...

And while all of the above are true, a 4th (not necessarily better)
option is to have a 

[jQuery] Re: XHTML or HTML when creating elements?



Richard D. Worth wrote:


Best practice, valid HTML, and compatible with XHTML would be
$('#whatever').html('');
$('#whatever').html('');
$('#whatever').html('');


Well, not quite "valid" HTML...

If you use "" in an HTML 4.01 page, the validator at
"w3.org" gives a warning with the following explanation:

  The sequence  can be interpreted in at least two different
  ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict,
  the '/' terminates the tag '). However, since
  many browsers don't interpret it this way, even in the presence of an
  HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure
  HTML documents and reserve its use solely for those written in XHTML.

That means that "" is valid, but it does not mean what
it was supposed to mean (in HTML 4.01). It means ">"!

Still, it's not likely that any browser will actually
produce ">" "from $('#whatever').html('')".
But we're talking "best practices" here.

--
Bertilo Wennergren 


[jQuery] Re: How can i add Buttons?

jCarousel ?? did you try this?
http://sorgalla.com/projects/jcarousel/examples/static_controls.html

2009/9/21 Pesimist 

>
> hello everyone.
> i have a problem. i wanna add left and right buttons but i couldn't i
> have tried long time so really i need.
>
> i am looking for like this for example:
>
> Prev
>
> or
>
> 
>
> i wanna put like this buttons. please help me.
>


[jQuery] Re: XHTML or HTML when creating elements?

Best practice, valid HTML, and compatible with XHTML would be
$('#whatever').html('');
$('#whatever').html('');
$('#whatever').html('');

- Richard

On Thu, Sep 24, 2009 at 12:33 PM, Bertilo Wennergren wrote:

>
> Richard D. Worth wrote:
>
>  I won't speak to the jQuery documentation, nor jQuery's internal
>> implementation for $(html), only your questions about HTML and XHTML,
>> based
>> on my own knowledge and best practices: [...]
>>
>
> Thanks!
>
> So if I understand your points, the following examples can be called "best
> practices" when using jQuery along with HTML 4.01:
>
>  $('#whatever').html('');
>  $('#whatever').html('');
>  $('#whatever').html('');
>
> Actually I code everthing in XHTML, but I still wondered
> how this is supposed to be done in jQuery in old style HTML.
>
> I think I read somewhere that jQuery just passes the
> code along to the "innerHTML" function of the browser.
> That would mean that the actual rules are those of the
> browsers' various implementations of "innerHTML" (whatever
> those may be...).
>
>
> --
> Bertilo Wennergren 
>


[jQuery] Re: Changing a class name without clicking

you'll need an event to attach your function call to, whether that's
document ready or click or...

you might also find toggleClass to be
useful here

Jon


2009/9/24 Lleoun 

>
> Hi all,
>
> I have the following:
>
> content
>
> I want to change unselected into selected when calling a function.
>
> The ways I'm finding to do a class name change is using a clicking:
> $('.unselected').click(function(){
>   $('.selected').attr('class','unselected');
>   $(this).attr('class','selected');
> });
>
> But I don't want to click, I need to do it by calling a function ..
> how can I do that?
> Thanks a lot !
>


[jQuery] Re: XHTML or HTML when creating elements?



Richard D. Worth wrote:


I won't speak to the jQuery documentation, nor jQuery's internal
implementation for $(html), only your questions about HTML and XHTML, based
on my own knowledge and best practices: [...]


Thanks!

So if I understand your points, the following examples can be called 
"best practices" when using jQuery along with HTML 4.01:


  $('#whatever').html('');
  $('#whatever').html('');
  $('#whatever').html('');

Actually I code everthing in XHTML, but I still wondered
how this is supposed to be done in jQuery in old style HTML.

I think I read somewhere that jQuery just passes the
code along to the "innerHTML" function of the browser.
That would mean that the actual rules are those of the
browsers' various implementations of "innerHTML" (whatever
those may be...).

--
Bertilo Wennergren 


[jQuery] Changing a class name without clicking


Hi all,

I have the following:

content

I want to change unselected into selected when calling a function.

The ways I'm finding to do a class name change is using a clicking:
$('.unselected').click(function(){
   $('.selected').attr('class','unselected');
   $(this).attr('class','selected');
});

But I don't want to click, I need to do it by calling a function ..
how can I do that?
Thanks a lot !


[jQuery] Re: Deactivating parent link with JQuery


Thanks Andi,

Yes, I meant an unordered list as you showed.

Rather than remove the  tag, is it possible to just 'deactivate'
it? i.e. when you click it, nothing happens, but the  tag stays in
place?

I ask, because I'd like to keep the CSS as simple as possible.

Thanks,

osu


On Sep 24, 6:05 pm, Andi23  wrote:
> First of all, let's clarify the actual HTML.  I assume this is what
> you have:
> 
>     Link 1
>     Link 2
>     Link 3
>         
>             Link 3a
>             Link 3b
>             Link 3c
>         
>     
>     Link 4
> 
>
> When you say "remove the link", I assume you want to turn this:
> Link 3
> into this:
> Link 3
>
> Given that, try this jQuery:
> $("li ul").siblings("a").each(function(){
>     $(this).replaceWith($(this).html());
>
> });


[jQuery] Re: Disabling parent link if children present



osu ha scritto:

- Link 1
- Link 2
- Link 3
- Link 4
 - Link 4a
 - Link 4b
 - Link 4c
- Link 5
  

I suppose you have a similar markup:


http://www.jquery.com";>Jquery
Search Engines
 
 http://www.google.com";>Google
 http://www.bing.com";>Bing
 



This is untested, but should work:

$('#mymenu a').click(function() {
 if($('ul', $(this).parent()).length > 0) {
return false;
 }
});

Bye


--
gianiaz.net - web solutions
via piedo, 58 - 23020 tresivio (so) - italy
+39 347 7196482 



[jQuery] Re: XHTML or HTML when creating elements?

I won't speak to the jQuery documentation, nor jQuery's internal
implementation for $(html), only your questions about HTML and XHTML, based
on my own knowledge and best practices:

*Non-void elements (sometimes called non-empty elements, meaning they can
contain text and child nodes)*
For an empty span element on its own, neither



nor



is technically valid HTML or XHTML, unless you rely on the html parser to
auto-close the element. And the rules for doing that depend on the element,
what follows it, and which html parser is being used (ie, which browser). As
a best practice, I, and the jQuery UI project by convention, always use



as a valid and consistent way to open and close a non-void but initially
empty element. Because many elements have an optional closing tag in html,
according to how browser html parsers behave, many people continue to use



or



and they may never have any problems in any browsers with that, though the
latter is merely an XML-compatible version of the former, not technically
valid XHTML as span is a non-void element. In the case of that (X)HTML being
parsed as html, which is most common, the browser will ignore the slash
inside the opening tag (as if you had specified ) and when it self
closes, it will be as if you had specified



*Void elements (sometimes called empty elements, meaning they cannot contain
text or child nodes)*
Void elements never have a closing tag, and don't require a closing slash in
the tag in HTML, but allow it for compatability with XHTML, which does
require it. See

http://wiki.whatwg.org/wiki/FAQ#Should_I_close_empty_elements_with_.2F.3E_or_.3E.3F

This is a relatively short list of elements (this one from
http://www.elharo.com/blog/software-development/web-development/2007/01/29/all-empty-tags-in-html/#comment-227448
):

area
base
basefont
br
col
frame
hr
img
input
isindex
link
meta
param

the most common ones being img and input. Note it does not include some very
commonly created elements such as

a
div
li
ol
span
table
td
th
tr
ul

- Richard

On Thu, Sep 24, 2009 at 11:30 AM, Bertilo Wennergren wrote:

>
> According to the jQuery documentation we're
> supposed to write like this:
>
>  $("")
>
> and not like this:
>
>  $("")
>
> http://docs.jquery.com/Core/jQuery#htmlownerDocument
>
> That means using XHTML style code for the
> elements created.
>
> Are we supposed to do that even when we are using
> HTML style code (e.g. HTML 4.01)?
>
> E.g.:
>
>  $('#whatever').html('');
>
> That would seem a bit bizarre if the actual HTML
> page has lots of '' without the
> ending slash.
>
> It does seem that "img", "br" etc. work without the
> ending slash as well.
>
> --
> Bertilo Wennergren 
>


[jQuery] (autocomplete)


I am using the jQuery plugin autocomplete on an country input field:

I got this php array with countries in dutch:
$global_countries = array();
$global_countries['AF'] = 'Afghanistan';
$global_countries['AX'] = 'Ålandseilanden';
$global_countries['AL'] = 'Albanië';
...

Then php implodes the array and evals a html file to fill the js var.
This is in my html file:

var countries = [$countries];
$("#country").autocomplete(countries, {
minChars: 2,
max: 12,
autoFill: false,
mustMatch: true,
matchContains: true,
scrollHeight: 220
});

But now, when I start to type a country I get ALL special characters
like: Belgi�

If I use php htmlentities on each country it is displayed like it
should in the select list, but when selected I see the ASCII code of
course. België becomes België


[jQuery] (treeview)


I'm very new a jQuery, and still just learning.

I've succesfully implented the treeview plugin on my html list. Only,
I don't want it to collapse when I click on a expanded folder. I do
want it to collapse when I click on a other folder that's not a child.
So that you only have one branch visible.

My javascript is still poor, but I'm a quick learner. My normally
script languages are PHP and Actionscript (2 and 3)

Thanx in advance


[jQuery] append and selector problem;


Hi,

I am facing one problem In jquery. For easy understanding, below html
code created.

Before clicking on CHANGE label if click on 12345, I am getting
hiii alert message.
After clicking on CHANGE I am not getting alert message.(I am
experting hii should come on click of 67890 also).

code sample



  http://code.jquery.com/jquery-latest.js";>

  
  $(document).ready(function(){
  $('#change').click(function(){
  $('#div1').empty();
  $('#div1').append('
NEW TEST
67890
EFGHI
'); }); $("tbody tr").click(function(){ alert("hii"); }); }); CHANGE TEST 12345 ABCD 1) Please explain why this is not behaving as experted. 2) In case of NOTE (see at last) change, why it is working? 3) how can I slow this issue NOTE:- If i change like below it is working. $(document).ready(function(){ $('#change').click(function(){ $('#div1').empty(); $('#div1').append('NEW TEST67890EFGHI'); $("tbody tr").click(function(){ alert("hii"); }); }); });

[jQuery] jQuery plugin help


Hello All,
I'm trying to create a plugin that I want to be able to call like
$.pluginname(...) where currently I have to call the plugin like this $
(...).pluginname.

Any help would be greatly appreciated.

Nalum


[jQuery] Load quicktime as needed


I'm a total jquery newbie and I'm just trying to find out if something
is possible.

If I have a full album worth of songs that I want to list on a web
page, can I use jquery to only embed the quicktime file after the user
clicks on a play button for that track.

Similar to Amazon's or iTunes play button per track.

The way I'm doing it right now, every song is embedded and therefore
is progressively downloading and soaking up bandwidth even though the
user may only listen to one song (or none).

Essentially, I want the song to only progressively download IF the
user clicks play.

I am NOT asking about autoplay versus click to play... instead my
question is about controlling the point in time that the file gets
embedded and starts downloading to the browser.

Any direction would be appreciated. I do have the "jquery.media.js"
plug in.

My ideal solution would be a list of song titles and a play button.
When the user clicks the play button, the quicktime play is revealed
below the title and ONLY at that moment does the file start
downloading.

Thanks.


[jQuery] Re: Way to "convert" DOM event to jQuery event?


If you need data for multiple fields, then a 3rd option is to create a
single hash/data object for the page and writing all your data into
that. This makes your data easy to read and debug, and is highly
efficient because you don't have to 'parse' anything...

var Record = {
foo:  "db-value-1"
,   bar:  db-value-2
,   baz:  db-value-3
}

Then you can use *either* jQuery or inline events to access this
data...

$(document).ready(function() {
 $("#myID").click(function() {
  alert( "foo = " + Record.foo );
  return false;
 });
});

You could use the fieldnames as keys in your data object to make it
generic...

var Record = {
myID1:  "db-value-1"
,   myID2:  "db-value-2"
,   myID3:  "db-value-3"
...
}

$(document).ready(function() {
 $("a.linkType").click(function() {
  alert( this.id + " = " + Record[ this.id ] );
  return false;
 });
});

/Kevin


On Sep 23, 5:57 pm, Ricardo Tomasi  wrote:
> Do you really need to output this data embedded in the HTML? Does it
> have any meaning/purpose without Javascript? There are two simple non-
> hackish ways you can do it:
>
> 1:
> load data later via XHR, use an element identifier to bind it
>
> 2:
> output metadata in the class attribute - it's valid, and not against
> the specification - the class attribute is not specifically meant for
> presentation, the specs say "For general purpose processing by user
> agents".
> ex: class="link { foo: 'bar', amp: 'bamp', x: [1,2,3] }".
>
> It's easy to create your own parser for that:
>
> $.fn.mdata = function(){
>    return window["eval"]("(" + this[0].className.match(/{.*}/) + ")");
>
> };
>
> $('a').mdata() == Object foo:'bar' etc..
>
> It will work as long as you use valid JSON.
>
> cheers,
> Ricardo
>


[jQuery] Re: Deactivating parent link with JQuery


First of all, let's clarify the actual HTML.  I assume this is what
you have:

Link 1
Link 2
Link 3

Link 3a
Link 3b
Link 3c


Link 4


When you say "remove the link", I assume you want to turn this:
Link 3
into this:
Link 3

Given that, try this jQuery:
$("li ul").siblings("a").each(function(){
$(this).replaceWith($(this).html());
});


[jQuery] Deactivating parent link with JQuery


I wrote this message earlier, but it got unpublished for some
reason...?

Is there a way of 'knocking out' i.e. removing the link from a parent
item in a list of links IF it has children links?

For example, 'deactivate' Link 3 only:

- Link 1
- Link 2
- Link 3
 - Link 3a
 - Link 3b
 - Link 3c
- Link 4

Is that possible? I think it should be with selectors, but can anyone
show me how?

Thanks,

osu


[jQuery] XHTML or HTML when creating elements?



According to the jQuery documentation we're
supposed to write like this:

  $("")

and not like this:

  $("")

http://docs.jquery.com/Core/jQuery#htmlownerDocument

That means using XHTML style code for the
elements created.

Are we supposed to do that even when we are using
HTML style code (e.g. HTML 4.01)?

E.g.:

  $('#whatever').html('');

That would seem a bit bizarre if the actual HTML
page has lots of '' without the
ending slash.

It does seem that "img", "br" etc. work without the
ending slash as well.

--
Bertilo Wennergren 


[jQuery] Re: jQuery in loaded content doesn't work


I ran into the same thing. I have the apple style slider that is on a page
that gets loaded into a div as content. And it no longer works. I would be
interested in following this post to see if any headway is made in this
particular topic.

Dave 

-Original Message-
From: mstone42 [mailto:si...@rocketmail.com] 
Sent: September-24-09 11:46 AM
To: jQuery (English)
Subject: [jQuery] Re: jQuery in loaded content doesn't work


Thanks, Chris!  I'll give livequery a try.



[jQuery] Re: jQuery in loaded content doesn't work


Thanks, Chris!  I'll give livequery a try.


[jQuery] Re: .click() fires my callback more than once



probably because you have click handlers inside the confirmAction 
function, which is run on click itself.

Fabdrol wrote:

Hi guys,

I'm facing this little problem, I've got a button toolbar, and users
can select rows in a table. When they have selected some row's, they
can click one of the buttons, and it invokes a callback.

Problem is, when I click the first time, there's nothing wrong. But
when I click the second time, it fires the callback two times, when I
click the third time it fires the callback three times, and so on.
That's a big problem, since the button is used to delete a page, and
obviously it should delete it only once, since the AJAX would return
an error ortherwise.

The code is seperated in three blocks, first the the onclick on the
button object, which invokes a function called confirmAction, taking
to parameters. [1], a message for the users, [2] the name of the
callback function. When the confirmation is confirmed, the
confirmAction function calls the callback. As said before, when I
click #delete once, it behaves like expected. But when I click the
second time (without refresh) it runs the callback function twice,
third time thrice, and so on.

Below is my code...

Thanks in advance!

the onclick on the button object
[code]
$('#delete').click(function() {
confirmAction('Weet je zeker dat je de geselecteerde pagina\'s 
wilt
verwijderen?', 'destroy');
});
[/code]

the confirmation (global for my app, that's why callback is an
parameter)
[code]
var confirmAction = function(msg, callback) {
var context = $('#confirmAction');
$('p.msg', context).html(msg);

$.blockUI({
message: context,
css: {
border: 'none',
padding: '15px',
backgroundColor: '#000',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
color: '#fff'
}
});

$('#confirmYes').click(function() {
$.unblockUI();
base[callback](true);
// [callback] is the function name, (true) the
parameter.
// base is global this cashed
});

$('#confirmNo').click(function() {
$.unblockUI();
return false;
});
}
[/code]

the callback:
[code]
var destroy = function(yesno) {
var arr = new Array();

if(yesno == true) {
$('input.do').each(function() {
if($(this).attr('checked') == true) {
arr.push($(this).val());
}
});

console.log(arr);
}
};
[/code]
  




[jQuery] complicated form with 'child objects'


Hi,

I try to implement a form for an item that can have several ‘child
objects’ - addresses (let us say with 3 strings: postcode, country,
city to keep things simple). The addresses will be send as a
stringified JSON array together with the remaining form elements to
the server (using the forms plugin) . I guess I will need some kind of
subform and a table (?) to store the ‘child objects’ with the
possibility to delete ‘child objects’ before posting.

 I am sure someone must have implemented something similar (possibly
using a nice jquery plugin?). Any pointers would be very much
appreciated. Many thanks in advance.

Christian


[jQuery] Re: Jquery and Pop up blockers


If you're not popping up new browser windows then you shouldn't have
to worry about popup blockers, and it has nothing to do with what
Javascript library you're using.

On Wed, Sep 23, 2009 at 8:40 PM, SEMMatt2  wrote:
>
> Does Jquery perform better or worse than other Java library with
> regard to not triggering pop up blockers?
>
> Thank you.
>



-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.


[jQuery] Re: fadeOut callback problem - is this a bug?


Are you forgetting that fadeOut takes *two* parameters?  The first
should be the speed of the effect, and the second is your callback
function.


On Thu, Sep 24, 2009 at 12:47 AM, cerberos  wrote:
>
> The contents of a fadeOut callback are supposed to be executed after
> the fadeOut has completed but there are problems when fading out
> multiple selectors (the alert is used to demonstrate).
>
>
> $("#foo, #bar").fadeOut( function(){ alert('test'); $("#baz").fadeIn
> (); })
 #baz is faded in before the fadeOut has completed
>
>
> $("#foo, #bar").fadeOut( function(){ if( this.id == 'foo' ){ alert
> ('test'); $("#baz").fadeIn(); }})
 for some reason this works
>
>
> $("#foo, #bar").fadeOut( function(){ if( this.id == 'bar' ){ alert
> ('test'); $("#baz").fadeIn(); }})
 but this doesn't - it does the same as the first example
>
>
> Anyone know why? Is this a bug?



-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.


[jQuery] Refresh only a section of the page


Hello,
i am trying to use ajax for my site and i have a problem.
I have a live radio running on my home page and the rest, and i want
to navigate through the website without having to make the buffering
again.
I've searched multiple forums but no solutions.
Can you help me?


[jQuery] Find top-level elements


Working on WinXP in FireFox 3.0.14 with JQuery 1.3.2, I'm trying the
following code:

$.ajax({
  url: "http://foo.bar/document";
  data: 'r=' + Math.random(),
  success: function(value) {

var body = $(value).find('body'); // Always empty
var form = $(value).find('form'); // Always empty
var p = $(value).find('p'); // Actual paragraphs

  }
});

Now, "body" and "form" are always empty, while "p" contains actual
paragraphs.

When I debug $(value) with Firebug, I see that it has become an array
with some text nodes (whitespace), some link nodes (css) and a form
node. The form node contains script nodes (although in the html, they
occur in the head) and the content html.

Now I'd like "body" and "form" to contain their respective counterpart
from the newly loaded content, but, aside from doing some custom
implementation, can I do that with JQuery in some way with a find?
Obviously, the current find on body/form does not work, because it's
applied iteratively on the array and it cannot find top-level element.
The find('p') does work because they are not top-level within an array
node.

Regards,

Grimace


[jQuery] Re: Each function gives errors in IE6


2009/9/24 Shane Riley :
>
> Weird double post. Found the issue. For some reason declaring the
> variable worked. So I changed it to:
> var  top = (parseInt($(this).height()) / 2) - 6;
>

That's because "top" is already defined as a synonym for the top-level
window object, and IE gets upset if you try to overwrite it.

I think you'd get the same "Not implemented" error if you tried to
assign values to the global "self", "parent", and "window" properties
too. Assuming you're not running in a frame or an iframe, "self",
"top", "parent", and "window" all refer to the same object. In a frame
or iframe, "self" and "window" will refer to the framed document's
"window", and "top" will refer to the "window" object of the very
topmost document, while "parent" will refer to the "window" object of
the document containing the frame, which is not the same as "top" if
you have nested frames/iframes.

Regards,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/


[jQuery] validate date regexp


Hi, I'm using the jQuery validation plugin + masked Input 1.2.2 and
both works very well.
I'd like to add a validation function for dates with the format dd/mm/

I took the regexp from 
http://bassistance.de/jquery-plugins/jquery-plugin-validation/
specifically from Marco Antonio's post but if figured out that it
doesn't  work well for all leap years, for example it works for
29/02/2004 but not for 29/02/2000

Is there any way someone can tweak the regexp a little bit?

Thanks

jQuery.validator.addMethod(
"date",
function(value, element) {
var check = false;
var re = 
/^(?:(?:(?:0?[1-9]|1\d|2[0-8])\/(?:0?[1-9]|1[0-2]))\/(?:(?:1
[6-9]|[2-9]\d)\d{2}))$|^(?:(?:(?:31\/0?[13578]|1[02])|(?:(?:29|30)\/(?:
0?[1,3-9]|1[0-2])))\/(?:(?:1[6-9]|[2-9]\d)\d{2}))$|^(?:29\/0?2\/(?:(?:
(?:1[6-9]|[2-9]\d)(?:0[48]|[2468][048]|[13579][26]$/
if( re.test(value)){
check = true;
   }

return this.optional(element) || check;
},
"Please enter a correct date"
);


[jQuery] Re: Parse encoded HTML in XML node


Hi Jeff,

Could you post your JS code and your XML? I'd like to play around with
it for you, but things aren't really clear right now ;-)

Fabian

On 23 sep, 21:36, Jeff  wrote:
> Hi,
>
> I'm using $.ajax with a dataType of xml.  The XML document I'm getting
> has a  node that contains a bunch of encoded HTML.  Sample:
>
> 

[jQuery] jQuery crashing the page


I've got 2 pages:

a current events page and a past events page

the current events page loads fine as there is only about 10 events
the past events page takes about 30 seconds to load and will crash if
u click your mouse in the loading time

The pages are near identical the only difference is the query that
selects the events (> versus <)

The page loads immediately without:
http://ajax.googleapis.com/ajax/
libs/jquery/1.3.2/jquery.min.js">

But when i put it back in the above happens. Any ideas welcome!

PC I'm using jQuery.roundedcorners.

Sam


[jQuery] Re: Each function gives errors in IE6


Weird double post. Found the issue. For some reason declaring the
variable worked. So I changed it to:
var  top = (parseInt($(this).height()) / 2) - 6;

On Sep 24, 7:31 am, Shane Riley  wrote:
> I've got a simple each function that finds every subnav and assigns it
> a vertical position equal to half of the subnav's height. This works
> great in all modern browsers, but in IE6 I get errors from each of the
> two lines within the function. Here's the problem function:
>
> $(".subnav").each(function(i)
>         {
>                 top = (parseInt($(this).height()) / 2) - 6;
>                 $(this).css("top", ("-" + top + "px"));
>         });
>
> When I view the page in IE6, I get an error saying "Not implemented".
> If I comment out the line setting the top variable, I get an error
> saying "Invalid argument". Initially I was thinking the problem was in
> setting the CSS property for top, but now it seems something else is
> up.


[jQuery] Each function gives errors in IE6


I've got a simple each function that finds every subnav and assigns it
a vertical position equal to half of the subnav's height. This works
great in all modern browsers, but in IE6 I get errors from each of the
two lines within the function. Here's the problem function:

$(".subnav").each(function(i)
{
top = (parseInt($(this).height()) / 2) - 6;
$(this).css("top", ("-" + top + "px"));
});

When I view the page in IE6, I get an error saying "Not implemented".
If I comment out the line setting the top variable, I get an error
saying "Invalid argument". Initially I was thinking the problem was in
setting the CSS property for top, but now it seems something else is
up.


[jQuery] Each function gives errors in IE6


I've got a simple each function that finds every subnav and assigns it
a vertical position equal to half of the subnav's height. This works
great in all modern browsers, but in IE6 I get errors from each of the
two lines within the function. Here's the problem function:

$(".subnav").each(function(i)
{
top = (parseInt($(this).height()) / 2) - 6;
$(this).css("top", ("-" + top + "px"));
});

When I view the page in IE6, I get an error saying "Not implemented".
If I comment out the line setting the top variable, I get an error
saying "Invalid argument". Initially I was thinking the problem was in
setting the CSS property for top, but now it seems something else is
up.


[jQuery] [blockUI] IE: Cursor still displays hourglass symbol after unblocking


I encountered a possible blockUI bug in IE7 and IE8: If you block the
ui and don't move your mouse after that, the cursor  displays the
hourglass symbol UNTIL you move your mouse again.

Thus, the .unblock() method doesn't have the desired effect on the
mouse cursor.

You can easily reproduce the effect with the blockUI demos: just click
on the "Run" Button without moving your mouse further.

kind regards,

Franz


[jQuery] .click() fires my callback more than once


Hi guys,

I'm facing this little problem, I've got a button toolbar, and users
can select rows in a table. When they have selected some row's, they
can click one of the buttons, and it invokes a callback.

Problem is, when I click the first time, there's nothing wrong. But
when I click the second time, it fires the callback two times, when I
click the third time it fires the callback three times, and so on.
That's a big problem, since the button is used to delete a page, and
obviously it should delete it only once, since the AJAX would return
an error ortherwise.

The code is seperated in three blocks, first the the onclick on the
button object, which invokes a function called confirmAction, taking
to parameters. [1], a message for the users, [2] the name of the
callback function. When the confirmation is confirmed, the
confirmAction function calls the callback. As said before, when I
click #delete once, it behaves like expected. But when I click the
second time (without refresh) it runs the callback function twice,
third time thrice, and so on.

Below is my code...

Thanks in advance!

the onclick on the button object
[code]
$('#delete').click(function() {
confirmAction('Weet je zeker dat je de geselecteerde pagina\'s 
wilt
verwijderen?', 'destroy');
});
[/code]

the confirmation (global for my app, that's why callback is an
parameter)
[code]
var confirmAction = function(msg, callback) {
var context = $('#confirmAction');
$('p.msg', context).html(msg);

$.blockUI({
message: context,
css: {
border: 'none',
padding: '15px',
backgroundColor: '#000',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
color: '#fff'
}
});

$('#confirmYes').click(function() {
$.unblockUI();
base[callback](true);
// [callback] is the function name, (true) the
parameter.
// base is global this cashed
});

$('#confirmNo').click(function() {
$.unblockUI();
return false;
});
}
[/code]

the callback:
[code]
var destroy = function(yesno) {
var arr = new Array();

if(yesno == true) {
$('input.do').each(function() {
if($(this).attr('checked') == true) {
arr.push($(this).val());
}
});

console.log(arr);
}
};
[/code]


[jQuery] Re: Want the submitted data from page loaded in iframe in parent page.


so where is your js reside? in the iframe or out side?
i think the best way is put your js in the iframe, so your parent
frame does not need to operate your iframe at all.


On Thu, Sep 24, 2009 at 12:44 PM, Nils  wrote:
>
> Hi all,
>         I am relatively starter in php, javascript & jquery. I have a
> web page that loads a signup page from other site. What i want to do
> is get the signup information entered by user in the page inside
> iframe on my current page so that i can store the data in my db. The
> signup form that get loaded in iframe has submit button that does the
> processing of the data entered by user. So i want the data on my
> parent form.
> anybody can help me on this???
> Thanks in advance.
> Regards
> Nils
>



-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/
http://meme.yahoo.com/davidshen84/


[jQuery] Jquery and Pop up blockers


Does Jquery perform better or worse than other Java library with
regard to not triggering pop up blockers?

Thank you.


[jQuery] Re: Tablesorter is not sorting numbers correct


Ok thanks for that advise, the link is broken on that website, but
found an updated version on http://plugins.jquery.com/project/metadata

Works like a charm now!
thanks a lot

/Fons


On Sep 22, 10:23 pm, jlcox  wrote:
> You'll need to include the metadata plugin if you want to do like
> that. See the bottom of the tablesorter download page.


[jQuery] Want the submitted data from page loaded in iframe in parent page.


Hi all,
 I am relatively starter in php, javascript & jquery. I have a
web page that loads a signup page from other site. What i want to do
is get the signup information entered by user in the page inside
iframe on my current page so that i can store the data in my db. The
signup form that get loaded in iframe has submit button that does the
processing of the data entered by user. So i want the data on my
parent form.
anybody can help me on this???
Thanks in advance.
Regards
Nils


[jQuery] document.body is null or not an object


There is a ticket with JQuery,Ticket #5032, which describes a problem
where JQuery fails during start-up with the message "document.body is
null or not an object". So far the bug is only reproducable in IE6. It
seems that a fix is not imminent for this issue, so I may need to
patch JQuery.

I am curious to know what the implications of wrapping the place in
code where the error is thrown from.

The error originates from support.js

82  // Figure out if the W3C box model works as expected
83  // document.body must exist before we can do this
84  jQuery(function(){
85  var div = document.createElement("div");
86  div.style.width = div.style.paddingLeft = "1px";
87
88  document.body.appendChild( div );
89  jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth
=== 2;
90  document.body.removeChild( div ).style.display = 'none';
91  div = null;
92  });

would change to:

82  // Figure out if the W3C box model works as expected
83  // document.body must exist before we can do this
84  jQuery(function(){
if (document.body != null){
85   var div = document.createElement("div");
86   div.style.width = div.style.paddingLeft = "1px";
87
88   document.body.appendChild( div );
89   jQuery.boxModel = jQuery.support.boxModel =
div.offsetWidth === 2;
90  document.body.removeChild( div ).style.display =
'none';
91  div = null;
}
92  });


As I understand, this method is performing a W3C box model support
test to determine if the browser renders the div in conformance with
W3C standards.  This is done when the library is first loaded.

I am hoping someone can answer the following:

1.If the attribute jQuery.boxModel is never referenced anywhere in
my code; can this break internal jQuery functionality at all?


2.Would it be better to simply comment this code altogether and
simply default jQuery.boxModel to false?


3.Is there any other code executed at start-up that I should be
concerned about?  (ie. anywhere else where a DOM test like this is
executed?


  1   2   >

NEW TEST
67890
EFGHI