[jQuery] i need help

2009-12-03 Thread iammultic
Hello, Please help me. I found a bug. Describe in detail...
I enter a search word and get from database rows - links with
parameter kodbpod unit.

tabletrtdspana href= onclick=javascript:getTreeView
(7);return false;Отдел сопровождения ПЦ/a/span/td/tr
trtdspana href= onclick=javascript:getTreeView(11);return
false;Отдел разработки банковских систем/a/span/td/tr/
table

http://pastie.org/725120 (see this).

After I click on the link and call the function getTreeView(kodbpod)
that builds a tree units by jquery.treeview.js ( http://pastie.org/725130
) and
jquery.treeview.async.js ( http://pastie.org/725128 )

When I click first link - a tree is works normal, branches opened and
closed by pressing the branches.
But when you're clicking the same link a second time, the tree is
built, but the branch is not open and not closed.
I looked up what the code is formed at the output in the first case,
when the tree is working normal.

ul class=treeview id=asyncli class=open collapsable
lastCollapsable id=1div title=tree_div class=hitarea open-
hitarea collapsable-hitarea lastCollapsable-hitarea/divspan
class=Блок ИТ/spanulli id=spana class=
href=Бочарников Игорь Викторович  И.О. Управляющего директора
1075, 1202/a/span/lili class=open collapsable lastCollapsable
id=2div title=tree_div class=hitarea open-hitarea collapsable-
hitarea lastCollapsable-hitarea/divspan class=Департамент
проектирования информационных систем/spanul style=display:
block;li class=open collapsable lastCollapsable id=3div
title=tree_div class=hitarea open-hitarea collapsable-hitarea
lastCollapsable-hitarea/divspan class=Управление по разработке
транзакционных систем/spanulli class=last id=7spanОтдел
сопровождения ПЦ/span/li/ul/li/ul/li/ul/li/ul

 And then look what the code is formed at the output in the second
case, when the tree is built, but does not work.

ul class=treeview id=asyncli class=open collapsable
lastCollapsable id=1div title=tree_div class=hitarea open-
hitarea collapsable-hitarea lastCollapsable-hitarea/divdiv
title=tree_div class=hitarea open-hitarea collapsable-hitarea
lastCollapsable-hitarea/divspan class=Блок ИТ/spanulli
id=spana class= href=Бочарников Игорь Викторович  И.О.
Управляющего директора  1075, 1202/a/span/lili class=open
collapsable lastCollapsable id=2div title=tree_div
class=hitarea open-hitarea collapsable-hitarea lastCollapsable-
hitarea/divdiv title=tree_div class=hitarea open-hitarea
collapsable-hitarea lastCollapsable-hitarea/divspan
class=Департамент проектирования информационных систем/spanul
style=display: block;li class=open collapsable lastCollapsable
id=3div title=tree_div class=hitarea open-hitarea collapsable-
hitarea lastCollapsable-hitarea/divdiv title=tree_div
class=hitarea open-hitarea collapsable-hitarea lastCollapsable-
hitarea/divspan class=Управление по разработке транзакционных
систем/spanulli class=last id=7spanОтдел сопровождения ПЦ/
span/li/ul/li/ul/li/ul/li/ul

You see ? Duplicate DIV in second case. And so every time: at
1,3,5,7 ... click on the link tree is built and works at 2,4,6,8 ...
click on the same link tree is built, but does not work.
I think the bug here somewhere...

this.prepend(div title=\tree_div\ class=\ + CLASSES.hitarea +
\/).find(div. + CLASSES.hitarea).each(function() {
var classes = ;

$.each($(this).parent().attr(class).split( ), function() {
classes += this + -hitarea ;
});
$(this).addClass( classes );
});

 but I don't know how to fix it...
How to fix this? HELP PLEASE.


[jQuery] Re: BlockUI strange behaviour in IE7

2009-12-03 Thread Filipa Andrade
Hi Mike,

sorry but I cant post a link. I will try to make one example of this
problem and post it here.
As additional information I can say that without BlockUI the problem
doesn't happen. I am using it inside an iframe.
I am using jquery 1.3.2.

Here is the simplified code:

div
iframe
html lang=en xml:lang=en xmlns=http://www.w3.org/1999/xhtml;
head
titleBlockui example/title
meta content=en http-equiv=Content-Language/
meta content=text/html; charset=utf-8 http-equiv=Content-Type/
script src=jquery-1.3.2.min.js type=text/javascript/script
script src=jquery.blockUI.js type=text/javascript/script
script type=text/javascript src={% staticresource 'js/
jquery.blockUI.js' %}/script
script type=text/javascript
$(document).ready(function() {
$('form.my-form').submit(function() {
$.blockUI({
message: 'h1{% trans Updating status... %}/
h1',
overlayCSS: { backgroundColor: '#fff', opacity:
0.1 }
});
});
});
/script

body
  form method=post action=
div
  table
tbody
  tr
td
  div
select id=id_example name=example
option selected=selected value=1One/option
option value=2Two/option
option value=3Three/option
/select
  /div
/td
 /tr
/tbody
/table

/div
pinput type=submit value=Save//p

/form
/body
/html
/iframe
/div

On Dec 2, 5:53 pm, Mike Alsup mal...@gmail.com wrote:
  I am using BlockUI in a pop-up to block it while the new data inserted
  by the user is updated.

  It works pretty good in firefox but IE7 has a strange behaviour: after
  pushing the submit button the overlay message is displayed and the pop-
  up is closed (until here everything is fine) but after, the page the
  user was viewing is continued to be refreshed (I dont know exactly
  what it is doing but the progress bar is continuously moving forward,
  I dont see any new requests in the server...)

 Can you post a link?


[jQuery] thumbPopup within news ticker

2009-12-03 Thread Medes
Hi

I have a vertical news ticker which contains ul li and img and what i
want to do is when you  have mouse over the img it will be like a
tooltip and show the real size of the imag.
the news ticker works fin but the problem is, the mouse over works
just once. i mean it works just for those images was loaded first time
not those image which slide down to the list, nothing happend here is
the code
thanks for your help

 script src=scripts/jquery-1.3.2.min.js type=text/javascript/
script
script src=scripts/jquery.thumbhover.js type=text/javascript/
script
script type=text/javascript
$(document).ready(function(){

$(img).thumbPopup({
  imgLargeFlag: _l
});


var speed = 1500;
var pause = 4000;

interval = setInterval(newsticker, pause);

function newsticker()
{
last = $('ul#listticker li:last').hide().remove();
$('ul#listticker').prepend(last);
$('ul#listticker li:first').slideDown(speed);

last2 = $('ul#listticker2 li:last').hide().remove();
$('ul#listticker2').prepend(last2);
$('ul#listticker2 li:first').slideDown(slow);
}

});
/script


[jQuery] listnav - how to implement paging

2009-12-03 Thread prasad
Hi,

I like the 'jQuery ListNav Plugin' very much and i need to implement
it in my application.

I need to implement the paging functionality along with this plugin.
If i have more than 100 rows for a character, its best to have a
paging with it.

Any help/sugestions on how to use this plugin along with paging?


[jQuery] jQuery and Ajax find() and filter() functions NOT working for me ugh.

2009-12-03 Thread webjedi
I am successfully submitting a form using jQuery.

I have code snippit below that I am trying to use some ajax functions
to go thru the results page that is sent back by the form.

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
html
head
meta http-equiv=Content-Type content=text/html;charset=UTF-8 /

That's the results page of the form above. I can fetch and show the
whole page but this does not work (below). This snippit is an .ajax
function.. just the part where its failing. is datatype wrong?
If I change $('#basic').hide().html(response).fadeIn(1500); to $
('#basic').hide().html(data).fadeIn(1500); the page shows in the
#basic div tag just fine. Why wont it get the #alertmsg div from the
form response page.


data: dataString,
dataType: html,
success: function(data) {
var response = $(data).find('#alertmsg').html();
$('#basic').hide().html(response).fadeIn(1500);
}


[jQuery] Once hidden elements no longer report values

2009-12-03 Thread kenyabob
I have built a contact form that appears using lightbox at the
following site:

http://www.dassant.com/

The jquery in question can be found here

http://www.dassant.com/_scripts/mailer.js

The .val() of the input fields gives me nothing, although it seems
that I can toggle them on and off in the form. Why aren't they
reporting their values?


[jQuery] Help with Datepicker

2009-12-03 Thread polarwarp
I am trying to use the jquery datepicker.  I can't figure out how to
make an image appear next to my textbox that will launch the popup.
Currently I have a .NET textbox which you user can click on that
launches the calendar.  So that part seems to be fine.  However no
image which would be more intuitive!

I have this:

$(document).ready(function(){$
('#MembershipWizard1_Wizard1_ctl05_ClubConfirmation1_txtStartDate').datepicker
({ dateFormat: 'dd/mm/yy',gotoCurrent: true,minDate: 0, buttonImage:
'App_Themes/Images/Ecommerce/datepicker.gif', buttonImageOnly:
true });});

I've tried a few variations of the buttomImage url in case I was
referencing it wrong - but nothing is working.  I've also tried not
having the buttomImageOnly property - but no difference.

Any help would be greatly appreciated!!

Thanks,
Jen


[jQuery] Re: Stop a button within an li taking the li event?

2009-12-03 Thread Rich
Thanks Rob

I'll have a look into bubbling - do I cancel bubbling on the li click
event or button click event?

Some of the validation errors are because I simplified the html code
for the purpose of this discussion but missed some tags. I wasn't
aware of a form not being valid in a span so thanks for that, not sure
what you mean by an input not allowed to be a child of a form though??

Thanks again.

Rich


On Dec 2, 11:23 pm, RobG rg...@iinet.net.au wrote:
 On Dec 2, 8:33 pm, Rich reholme...@googlemail.com wrote:

  I have an unordered list which slidesdown to reveal a sub list on
  click event. In the first li there is also a button that takes you to
  another page.
  When this button is pressed I don't want the slide down
  to start, which it currently does as the button is within the li.

 Click events bubble. If you don't want them to, cancel bubbling.

 Your markup is invalid, it has several serious errors. In particular,
 a form can't be a child of a span element, nor can an input be a child
 of a form element. Use a validator:

   URL:http://validator.w3.org/#validate-by-input

 [...]

 --
 Rob


[jQuery] Re: Click Even

2009-12-03 Thread shapper
On Dec 3, 2:52 am, JMcGinnis justin.mcgin...@gmail.com wrote:
 y0, Not really, why do you need to/ or want to? you could do this

 $('#Play').click(function() { $.cookies.set('WCA.Player', 'Play', { path:
 '/' }) })

 ha, j/k same thing, just one line.  Could you just explain why you would
 like to do it a different way? or where you just wondering?

I was just wondering ... Thank you.


[jQuery] IF. What am I doing wrong?

2009-12-03 Thread shapper
Hello,

I have the following code:

  alert($.cookies.get(WCA.Player));
  var cookie = $.cookies.get(WCA.Player);
  if (cookie == null || cookie == 'Play') {
 $(#JPlayer).play();
  }

The alert gives me the correct value which is null or 'Play' but the
if is not working correctly.
Am I doing something wrong?

Thanks,
Miguel








[jQuery] Re: Once hidden elements no longer report values

2009-12-03 Thread jpcozart
One of the scripts or plugins you are using appears to be duplicating
the code for the form creating 2 forms with the same attributes on the
same page.  The first form is never being shown at all and is not
accepting input. Using some jQuery like this:

$('[name=yourName]:last').val()

you can access these form elements, but I would try to figure out how
the form is being duplicated and fix that problem.  You can see both
forms in the markup by using firebug or the inspector in google
chrome.

I will let you know if I see where the form is being duplicated.  Good
luck.

Jeremy

On Dec 2, 7:42 pm, kenyabob andy.skogr...@gmail.com wrote:
 I have built a contact form that appears using lightbox at the
 following site:

 http://www.dassant.com/

 The jquery in question can be found here

 http://www.dassant.com/_scripts/mailer.js

 The .val() of the input fields gives me nothing, although it seems
 that I can toggle them on and off in the form. Why aren't they
 reporting their values?


[jQuery] Re: Help with Datepicker

2009-12-03 Thread MorningZ
Use Fiddler (for IE) or Firebug (for FF) and watch the Net tab to
see why the browser doesn't see the image..  this, depsite your
attempts otherwise, more than likely is a pathing issue, especially
keeping in mind that .NET rebases all the CSS includes and theming


On Dec 2, 10:29 pm, polarwarp polarw...@gmail.com wrote:
 I am trying to use the jquery datepicker.  I can't figure out how to
 make an image appear next to my textbox that will launch the popup.
 Currently I have a .NET textbox which you user can click on that
 launches the calendar.  So that part seems to be fine.  However no
 image which would be more intuitive!

 I have this:

 $(document).ready(function(){$
 ('#MembershipWizard1_Wizard1_ctl05_ClubConfirmation1_txtStartDate').datepicker
 ({ dateFormat: 'dd/mm/yy',gotoCurrent: true,minDate: 0, buttonImage:
 'App_Themes/Images/Ecommerce/datepicker.gif', buttonImageOnly:
 true });});

 I've tried a few variations of the buttomImage url in case I was
 referencing it wrong - but nothing is working.  I've also tried not
 having the buttomImageOnly property - but no difference.

 Any help would be greatly appreciated!!

 Thanks,
 Jen


[jQuery] Slow connection + timing issue

2009-12-03 Thread Subtle
I'm not sure if I can explain this very well but... When running IE
6-8 on a slow connection, JQuery seems to bomb before the page is
ready.  Errors like, JQuery is undefined, $ is undefined and so on
occur.  However, when I switch over to a faster connection (i.e. on
the internal network) there are no errors.  On a slow connection, the
very first line of jquery code in the webpage errors out.  I checked
the paths to jquery and both the slow and fast connections can find
it.

Here is the order of the script tags

SCRIPT src=jquery-1.3.2.min.js type=text/javascript/SCRIPT
link type=text/css href=jquery-ui-1.7.2.custom.css
rel=stylesheet /
SCRIPT src=jquery-ui-1.7.2.custom.min.js type=text/javascript/
SCRIPT
SCRIPT src=jquery.blockUI.js type=text/javascript/SCRIPT
SCRIPT src=jquery.ajaxmanager.js type=text/javascript/SCRIPT
SCRIPT src=jquery.tools.min.js type=text/javascript/SCRIPT
SCRIPT src=jquery.validate.min.js type=text/javascript/SCRIPT

Thanks.


[jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-03 Thread Acaz Souza
The jquery framework in past, it use the fx animation, it's true?

On Dec 2, 4:26 pm, MorningZ morni...@gmail.com wrote:
 How is someone *possibly* supposed to answer that open ended and vague
 question?

 On Dec 2, 1:13 pm, Acaz Souza acazso...@gmail.com wrote:



  anyone can help me?

  On Dec 2, 11:31 am, Acaz Souza acazso...@gmail.com wrote:

   Why mootools animations is more smooth than jquery animations?


Re: [jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-03 Thread Michel Belleville
I wonder, is this a feeble attempt at launching a troll, a poorly worded
vague question, or just good old plain nonsense ?

Michel Belleville


2009/12/3 Acaz Souza acazso...@gmail.com

 The jquery framework in past, it use the fx animation, it's true?

 On Dec 2, 4:26 pm, MorningZ morni...@gmail.com wrote:
  How is someone *possibly* supposed to answer that open ended and vague
  question?
 
  On Dec 2, 1:13 pm, Acaz Souza acazso...@gmail.com wrote:
 
 
 
   anyone can help me?
 
   On Dec 2, 11:31 am, Acaz Souza acazso...@gmail.com wrote:
 
Why mootools animations is more smooth than jquery animations?



Re: [jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-03 Thread Rey Bango

Acaz,

I think you should consider looking into this yourself. The animations 
provided by jQuery, while basic, are quite smooth and perform well. If 
you feel that the ones provided by MooTools perform better, then I would 
urge you to take the time to investigate it and consider offering 
patches should you find a good solution.


Best,

Rey
jQuery Team

Acaz Souza wrote:

The jquery framework in past, it use the fx animation, it's true?

On Dec 2, 4:26 pm, MorningZ morni...@gmail.com wrote:

How is someone *possibly* supposed to answer that open ended and vague
question?

On Dec 2, 1:13 pm, Acaz Souza acazso...@gmail.com wrote:




anyone can help me?
On Dec 2, 11:31 am, Acaz Souza acazso...@gmail.com wrote:

Why mootools animations is more smooth than jquery animations?




[jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-03 Thread Scott Sauyet
On Dec 3, 11:02 am, Rey Bango r...@reybango.com wrote:
 I think you should consider looking into this yourself. The animations
 provided by jQuery, while basic, are quite smooth and perform well. If
 you feel that the ones provided by MooTools perform better, then I would
 urge you to take the time to investigate it and consider offering
 patches should you find a good solution.

How does Rey do that?

Twice I stopped my fingers over the send key on a troll message.
I decided that ignoring it was my best bet.

I never even considered trying to turn it into a positive suggestion.

Sure, Rey, show us all up by being nicer!  :-)

  -- Scott


[jQuery] action not being executed??

2009-12-03 Thread Ini

Hi there, 

I have a page with a simple logo and an 'enter site' link which both fade in
when the page is loaded. When the link is clicked I want an action to be
executed. For now, lets just say I want to make the logo dissapear (fade
out) again. Here's my code;



script type=text/javascript src=Scripts/jquery-1.3.2.min.js/script

script type=text/javascript
  
  
  $(document).ready(function(){
  
  $('#logo').fadeIn(1500);
  $('#enter').fadeIn(2500);
  
});

$('a#site').click(function(){
$('#logo').fadeOut(1500);
return false;
});

/script


body

div id=logowrapper
div id=logo/div
div id=enter align=center # (Click to
Enter) /div
/div

/body


There are also some css rules to position the main div and to hide it
initially (display:none;) This works, and the two fadeIn commands work fine,
but not the .click(function() anyone



Many thanks in advance!

-- 
View this message in context: 
http://old.nabble.com/action-not-being-executed---tp26628709s27240p26628709.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



Re: [jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-03 Thread Rey Bango

LOL. :D

Thanks Scott.

Rey...

Scott Sauyet wrote:

On Dec 3, 11:02 am, Rey Bango r...@reybango.com wrote:

I think you should consider looking into this yourself. The animations
provided by jQuery, while basic, are quite smooth and perform well. If
you feel that the ones provided by MooTools perform better, then I would
urge you to take the time to investigate it and consider offering
patches should you find a good solution.


How does Rey do that?

Twice I stopped my fingers over the send key on a troll message.
I decided that ignoring it was my best bet.

I never even considered trying to turn it into a positive suggestion.

Sure, Rey, show us all up by being nicer!  :-)

  -- Scott



[jQuery] jquery [multi] overlay plugin and identifiers

2009-12-03 Thread Brian Yanosik
I'm using the jquery overlay plugin to launch a video using flowplayer.

I want to pass dynamic text to the script so that I only have to use 1
script for all the videos on one page.

I have the following code but am having trouble getting the identifier
relative to the current overlay.

Does anyone have any ideas?


pa rel=#overlay4 href=# cta='pa
href=http://domain.com/;Visit this trial/a/p'/p


div class=overlay id=overlay4div class=player
a class=fplayer href=path/to/video.flv /a
/div/div


script type=text/javascript language=javascript
$(function() {

$(a[rel]).overlay({
closeOnClick: true,
finish:  {
top: 30

   },
onBeforeLoad: function() {
this.getBackgroundImage().expose({color: '#444'});
cta = $(this);

console.log(cta);
this.getContent().find(a.fplayer).flowplayer(0).load();

},
onLoad: function(content) {

},
onClose: function() {
$.expose.close();
$f().unload();
}
});
flowplayer(a.fplayer,/flowplayer/flowplayer.commercial-3.1.0.swf, {

   key: '#...@a5e90fa94bbc2d7d51a',
clip: {
scaling: 'fit',
onCuepoint: [[2000], function() {

//if (this.attr(cta)) {
var myContent = this.getPlugin(myContent);

myContent.show();
myContent.setHtml(cta);
//}
}]
},

canvas: {
background: '#00',
 backgroundGradient: 'none',
},

plugins: {
 myContent: {
 url: '/flowplayer/flowplayer.content-3.1.0.swf',
 top: 20,

width: 300,
 borderRadius: 10,
display: 'none'

}
}
});
});
/script



My question is, how can I retrieve the attribute cta of the current
overlay? I know how to do this if it was just using the onclick even in
jquey (it would be as simple as $(this) but that doesnt seem to be the case
with the overlay script. Returns an object as the value of $(this).

Thanks
Brian


Re: [jQuery] IF. What am I doing wrong?

2009-12-03 Thread Michael Geary
How do you know the 'if' isn't working correctly? It doesn't play? At this
point we don't know if the problem is with the 'if' statement itself or with
the code inside it. Have you put another alert *inside* the if statement to
verify whether it actually gets there or not?

The 'if' statement is pretty fundamental to JavaScript. It doesn't fail. So
if something is going wrong, then likely either the value of 'cookie' is not
quite what you expect, or the code inside the if isn't working.

Could the cookie value have some whitespace in it? You wouldn't see that in
an alert. You can check it with things like this:

alert( cookie.length );
alert( '{' + cookie + '}' );

-Mike

On Thu, Dec 3, 2009 at 4:46 AM, shapper mdmo...@gmail.com wrote:

 Hello,

 I have the following code:

  alert($.cookies.get(WCA.Player));
  var cookie = $.cookies.get(WCA.Player);
  if (cookie == null || cookie == 'Play') {
 $(#JPlayer).play();
  }

 The alert gives me the correct value which is null or 'Play' but the
 if is not working correctly.
 Am I doing something wrong?

 Thanks,
 Miguel









Re: [jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-03 Thread Jonathan Vanherpe (T T NV)
I'm not trolling (at least today I'm not ;-)), but mootools' effects are 
smoother in at least some cases. I've switched to mootools for some 
websites just because of that, even though I really prefer working with 
jQuery.


Try using scrollTo() diagonally in both frameworks to see one example 
(ofcourse, this might just be the scrollto plugin's fault).


I refrained from replying because the OP seemed trollish, but he has a 
point, IMHO.


Jonathan

Rey Bango wrote:

LOL. :D

Thanks Scott.

Rey...

Scott Sauyet wrote:

On Dec 3, 11:02 am, Rey Bango r...@reybango.com wrote:

I think you should consider looking into this yourself. The animations
provided by jQuery, while basic, are quite smooth and perform well. If
you feel that the ones provided by MooTools perform better, then I would
urge you to take the time to investigate it and consider offering
patches should you find a good solution.


How does Rey do that?

Twice I stopped my fingers over the send key on a troll message.
I decided that ignoring it was my best bet.

I never even considered trying to turn it into a positive suggestion.

Sure, Rey, show us all up by being nicer! :-)

-- Scott






--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] Google maps v3 in tabs Problem

2009-12-03 Thread dinos
I try to embed a Google Map v3 in a tab.
In the HEAD of the tab html I put the META and SCRIPT tags needed
for the map.
When it loads in Firefox creates a completely new page with no body
and error messages: '$ is not defined' and 'm.google.maps is not
defined'
This happens even if I do not initialize the map.
In IE it does not has a problem if I don't initialize but if I do
gives me an two errors 'google = undefined' and 'some object does not
suport some method'

The same google code works fine in the page loaded individually (not
as a tab)

I would appreciate any help or ideas.
Thanks


[jQuery] star rating pugin and firefox

2009-12-03 Thread led
I have this starnge problem in firefox 3.5.5  and chome that stop/slow
down the page. See it in
http://realferias.com/casasdeferiasalgarve/Allpessoas-All-tipoAll-mesAll.aspx


[jQuery] events, this.options and empty()

2009-12-03 Thread andreas
I have a small problem with event-functions not seeing the
this.options-variable.

Small example:
  http://event.pastebin.com/m249d7f9d

I tried to work around it by supplying this in the data-parameter
for every .bind(),
but it is an ugly solution I think.


Also, is it bad to just call .empty() even if there are several events
bound to the nodes being discarded?


Thank you.


[jQuery] Selector issue

2009-12-03 Thread Civette
Well i'm in trouble.

Following code does not trigger :

Code: Select all
$(#cat_list  div).click(function()
{   alert(Bye bye!);;
});



neither

Code: Select all
$(#cat_list ~ div).click(function()
{   alert(Bye bye!);;
});



or

Code: Select all
$(#cat_list  *).click(function()
{   alert(Bye bye!);;
});



Altough this works :

Code: Select all
$(#cat_list).click(function()
{   alert(Bye bye!);;
});



HTML code looks like :

div id=cat_list
div id=39a/div
div id=40b/div
...
/div



Any idea ?

thanks


[jQuery] jQuery gives error on page in IE after hover.

2009-12-03 Thread Duncan Krebbers
I'm using a simple jQuery hover script on my page to animate
menubuttons 15px to the right on a hover. They go back at a mouse-out.

The jQuery version I'm using is 1.3.2 from the Google API's.
The script, located in the head of my index.php, is down here.

 $(document).ready(function(){
  $('.navitem').hover(
  function () {
$(this).animate({paddingLeft:10px},250);
  },
  function () {
$(this).animate({paddingLeft:-10px},250);
  });
  });

In FF and Chrome it works nice, but in IE after a hover the statusbar
shows me error in page and the hovers don't work anymore.

The error-details show me this (translated from Dutch):
Message: Invalid Argument
Line: 19
Character: 35190
Code: 0
URI: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js

Does anyone know what I'm doing wrong? Because I think it's a problem
with my side of the script.



[jQuery] Share plugin

2009-12-03 Thread RiccardoC
I just created a nice (at least I think it's nice :D ) plugin to make
tables with scrollable body (tested on different browsers). I'm a bit
new in the JQUERY community (hi to all!!) and I would like to ask all
you where is the best way (and place) to share this plugin

(the plugin use two div container added around the table element
and 4 css rule definition)

Thanks in advance


[jQuery] Re: Selector issue

2009-12-03 Thread RiccardoC
I'm relative new to jQuery, but I usually use function(e) instead of
function() within a click handlers, because when you do it on a
selector that do not return a single element (#cat_list  div
returns several dom element) you cannot access the data you need
(e.target is the element you clicked). #cat_list return a single dom
element and it's not a problem
I don't know if this is the issue

On 3 Dic, 16:03, Civette la.cive...@gmail.com wrote:
 Well i'm in trouble.

 Following code does not trigger :

 Code: Select all
     $(#cat_list  div).click(function()
     {   alert(Bye bye!);;
     });

 neither

 Code: Select all
     $(#cat_list ~ div).click(function()
     {   alert(Bye bye!);;
     });

 or

 Code: Select all
     $(#cat_list  *).click(function()
     {   alert(Bye bye!);;
     });

 Altough this works :

 Code: Select all
     $(#cat_list).click(function()
     {   alert(Bye bye!);;
     });

 HTML code looks like :

     div id=cat_list
     div id=39a/div
     div id=40b/div
     ...
     /div

 Any idea ?

 thanks


[jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-03 Thread MorningZ
lol, trollish



On Dec 3, 11:49 am, Jonathan Vanherpe (T  T NV) jonat...@tnt.be
wrote:
 I'm not trolling (at least today I'm not ;-)), but mootools' effects are
 smoother in at least some cases. I've switched to mootools for some
 websites just because of that, even though I really prefer working with
 jQuery.

 Try using scrollTo() diagonally in both frameworks to see one example
 (ofcourse, this might just be the scrollto plugin's fault).

 I refrained from replying because the OP seemed trollish, but he has a
 point, IMHO.

 Jonathan



 Rey Bango wrote:
  LOL. :D

  Thanks Scott.

  Rey...

  Scott Sauyet wrote:
  On Dec 3, 11:02 am, Rey Bango r...@reybango.com wrote:
  I think you should consider looking into this yourself. The animations
  provided by jQuery, while basic, are quite smooth and perform well. If
  you feel that the ones provided by MooTools perform better, then I would
  urge you to take the time to investigate it and consider offering
  patches should you find a good solution.

  How does Rey do that?

  Twice I stopped my fingers over the send key on a troll message.
  I decided that ignoring it was my best bet.

  I never even considered trying to turn it into a positive suggestion.

  Sure, Rey, show us all up by being nicer! :-)

  -- Scott

 --
 Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] Re: Selector issue

2009-12-03 Thread MorningZ
the first one works perfectly fine in stripped down form

http://jsbin.com/epoju/edit

must be something else with other code you are doing


On Dec 3, 10:03 am, Civette la.cive...@gmail.com wrote:
 Well i'm in trouble.

 Following code does not trigger :

 Code: Select all
     $(#cat_list  div).click(function()
     {   alert(Bye bye!);;
     });

 neither

 Code: Select all
     $(#cat_list ~ div).click(function()
     {   alert(Bye bye!);;
     });

 or

 Code: Select all
     $(#cat_list  *).click(function()
     {   alert(Bye bye!);;
     });

 Altough this works :

 Code: Select all
     $(#cat_list).click(function()
     {   alert(Bye bye!);;
     });

 HTML code looks like :

     div id=cat_list
     div id=39a/div
     div id=40b/div
     ...
     /div

 Any idea ?

 thanks


Re: [jQuery] jQuery gives error on page in IE after hover.

2009-12-03 Thread Michael Geary
You're trying to use negative padding, but there is no such thing in CSS:

http://www.google.com/search?q=negative+padding;http://www.google.com/search?q=%22negative+padding%22

Can you use negative margin instead, or some other technique?

-Mike

On Thu, Dec 3, 2009 at 4:51 AM, Duncan Krebbers
duncankrebb...@hotmail.comwrote:

 I'm using a simple jQuery hover script on my page to animate
 menubuttons 15px to the right on a hover. They go back at a mouse-out.

 The jQuery version I'm using is 1.3.2 from the Google API's.
 The script, located in the head of my index.php, is down here.

  $(document).ready(function(){
  $('.navitem').hover(
  function () {
$(this).animate({paddingLeft:10px},250);
  },
  function () {
$(this).animate({paddingLeft:-10px},250);
  });
  });

 In FF and Chrome it works nice, but in IE after a hover the statusbar
 shows me error in page and the hovers don't work anymore.

 The error-details show me this (translated from Dutch):
 Message: Invalid Argument
 Line: 19
 Character: 35190
 Code: 0
 URI: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js

 Does anyone know what I'm doing wrong? Because I think it's a problem
 with my side of the script.




[jQuery] Re: Click event outside of an element

2009-12-03 Thread Keysher
Umm, It seems fine, I'll check it later.

Thanks!

On 23 nov, 15:13, Dustan dustan.kas...@gmail.com wrote:
 Perhaps something along these lines is what you are looking for?

 $(document).click(function(event) {
     if (!$(event.target).hasClass('classname')) {
         // run this code if anywhere in the document except the item
 is clicked
     }

 });

 On Nov 20, 8:29 am,Keysherkeys...@gmail.com wrote:



  Hi!

  I am newbie in JQuery. I want to catch click event outside and
  specified class.

  For example, I have a div with class classname, and I want to attach
  some actions when I click outside, in the rest of the page.

  I tried with this (to get the classname where I click):

  $('*').click(function(){
          alert($(this).attr('class'));

  });

  But not works!

  Any idea?

  Thanks!

  P.D: sorry for the bad english!- Ocultar texto de la cita -

 - Mostrar texto de la cita -


Re: [jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-03 Thread Rey Bango
That's certainly possible. Again, for me the animations provided by 
jQuery have been great. I'd give you the same feedback in that if there 
are issues, I'd urge you to see if you can pinpoint them and provide a 
patch. That would be a great help to the project.


Rey...

Jonathan Vanherpe (T  T NV) wrote:
I'm not trolling (at least today I'm not ;-)), but mootools' effects are 
smoother in at least some cases. I've switched to mootools for some 
websites just because of that, even though I really prefer working with 
jQuery.


Try using scrollTo() diagonally in both frameworks to see one example 
(ofcourse, this might just be the scrollto plugin's fault).


I refrained from replying because the OP seemed trollish, but he has a 
point, IMHO.


Jonathan

Rey Bango wrote:

LOL. :D

Thanks Scott.

Rey...

Scott Sauyet wrote:

On Dec 3, 11:02 am, Rey Bango r...@reybango.com wrote:

I think you should consider looking into this yourself. The animations
provided by jQuery, while basic, are quite smooth and perform well. If
you feel that the ones provided by MooTools perform better, then I 
would

urge you to take the time to investigate it and consider offering
patches should you find a good solution.


How does Rey do that?

Twice I stopped my fingers over the send key on a troll message.
I decided that ignoring it was my best bet.

I never even considered trying to turn it into a positive suggestion.

Sure, Rey, show us all up by being nicer! :-)

-- Scott








[jQuery] Re: jQuery gives error on page in IE after hover.

2009-12-03 Thread Scott Sauyet
On Dec 3, 12:43 pm, Michael Geary m...@mg.to wrote:
 You're trying to use negative padding, but there is no such thing in CSS:

But why does the padding go negative in IE?  It doesn't seem to happen
in FF or Chrome.  The -10px is on mouseleave, where mouseenter set it
to 10px.

  -- Scott


[jQuery] Re: Once hidden elements no longer report values

2009-12-03 Thread kenyabob

Thanks guys, you got it. Including the additional div made then whole
thing come together. I guess I need to scrutinize the DOM a little
more next time!

On Dec 3, 7:38 am, jpcozart jeremy.coz...@gmail.com wrote:
 Fancybox is creating a new div and inserting a copy of the form into
 it.  This type of selection will allow you to access the form element
 values:

 $('#fancy_div #yourName').val()
 $('#fancy_div #yourMail').val()

 However, the copied form appears to be recreated after being closed
 and reopened.  When you open the form again the values are reset.

 I hope this helps.

 Jeremy

 On Dec 2, 7:42 pm, kenyabob andy.skogr...@gmail.com wrote:



  I have built a contact form that appears using lightbox at the
  following site:

 http://www.dassant.com/

  The jquery in question can be found here

 http://www.dassant.com/_scripts/mailer.js

  The .val() of the input fields gives me nothing, although it seems
  that I can toggle them on and off in the form. Why aren't they
  reporting their values?


[jQuery] Need help in jquery script for copying values

2009-12-03 Thread rose
Hi All,
I have a below jquery function to search the employee data and show
the result. i have a text box in which the user type in the empid and
click on search. Once user clicks on search it shows the employee
detail such as name, sex, race etc below the textbox.

$('#addEmployee').click(function(){
$.ajax({
url: 'searchEmployee.do?method=searchEmployee',
type: 'GET',
data: {employeeId: $('input#emp').val()},
success: function(data) {
$('div#resultEmp').css(padding,10px 0 10px 
0).html(data);
}
});
});

Once i get the proper employee data such as empid, name, race etc. I
have a href link for the empid . I click on the emp id link and i copy
that employee id into the textarea i have right below the results.
Now the user doesn't want to  click on the emp id to copy the value on
the textarea. They just want if data from backend is correct directly
copy to the textarea without clicking on empid(which i am showing as
results after clicking search).

To copy emp id  from the link to textarea i am calling another
javascript as below :

// Function for copying Employee Id to the textarea.

function selectEmp(id) {
if($('textarea#employee_id_textarea').val() ==){
$('textarea#employee_id_textarea').val(id) ;
}
else {
$('textarea#employee_id_textarea').val($
('textarea#employee_id_textarea').val() +, +id);
}
$('div#resultEmp').html().css(padding,0);
$('input#emp').val();
}


Could you please advise how i can do that? After result success i want
to copy the empid directly to the textarea without clicking. I don't
even know if i have made myself clear. Please let me know if you need
more information. Thanks in advance.


[jQuery] Banner Slide Show

2009-12-03 Thread zanm
Hi group,

I am new to jQuery.  I see a lot of examples out there that show you
how to make a banner slide show.  They work great, but how do I read
images from a specific folder?

The way I have my images structured for the banner is by season.  So,
I have a group of photos in a folder labeled Winter and one for
Spring...etc.

So, how do I get the current season (using jQuery) and all images in a
given folder (using jQuery).  This would replace the HTML div tag
section below.

Here is an example script for just the slide show:
http://jonraasch.com/blog/a-simple-jquery-slideshow

HTML:
div id=slideshow
img src=img/img1.jpg alt= class=active /
img src=img/img2.jpg alt= /
img src=img/img3.jpg alt= /
/div

STYLE:
#slideshow {
position:relative;
height:350px;
}

#slideshow IMG {
position:absolute;
top:0;
left:0;
z-index:8;
}

#slideshow IMG.active {
z-index:10;
}

#slideshow IMG.last-active {
z-index:9;
}

jQuery:
function slideSwitch() {
var $active = $('#slideshow IMG.active');

if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

// use this to pull the images in the order they appear in the
markup
var $next =  $active.next().length ? $active.next()
: $('#slideshow IMG:first');

// uncomment the 3 lines below to pull the images in random order

// var $sibs  = $active.siblings();
// var rndNum = Math.floor(Math.random() * $sibs.length );
// var $next  = $( $sibs[ rndNum ] );


$active.addClass('last-active');

$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}

$(function() {
setInterval( slideSwitch(), 5000 );
});


[jQuery] Xaxes position comparation

2009-12-03 Thread nao
I need a script that compares Xaxes position value of 2 objects  and
if those values are equals
one object does an animation (change of width and height).

does it make any sense? Im very new to jquery and scripting in
general... tnx to anyone who would help




[jQuery] next()

2009-12-03 Thread TMNT
Matt, thanks for your response.

I had originally posted this on jquery-dev group but was referred to
this group.
How do I access the id of the jquery object returned from the next()
function?
I tried Matt's suggestion below but I get an 'undefined' when I alert
state.attr('id').
thank you.

From: Matt Maxwell leftwithoutli...@gmail.com
Date: Thu, 3 Dec 2009 05:28:48 -0600
Local: Thurs, Dec 3 2009 3:28 am
Subject: Re: [jquery-dev] Re: next()
Reply | Reply to author | Forward | Print | Individual message | Show
original | Report this message | Find messages by this author

I would do something like

$(select.country).change(function () {
var country = $(this),
country_id = country.attr(id),
state = country.next(select.state);

});

state isn't the DOM element, it's the jQuery object, so you'd have to
go
alert(state.attr(id));

Hope this helps.

Also, I agree with Dave, this isn't the place for this kind of
question.

- Hide quoted text -
- Show quoted text -
On Wed, Dec 2, 2009 at 6:20 PM, Dave Methvin dave.meth...@gmail.com
wrote:
 The jQuery-en group is a better fit for this question. This group is
 for the discussion of the development of jQuery itself.

 --


[jQuery] Re: Superfish vertical/arrow question

2009-12-03 Thread MozreplGuy
Charlie, thank you for your time.
I agree it would be easier with a link.
I will get some hosting and move my stuff from localhost to there.
Then I will post a link.
Thanks again for taking the time to help a newbie like me!


On Dec 2, 4:43 am, Charlie charlie...@gmail.com wrote:
 snippets of html won't do much to troubleshoot.    95% likelihood the problem 
 is css related and css needs to be viewed in the DOM to work with effectively.
 The majority of posts regarding superfish on this board are Joomla related . 
 You can try searching. The original css gets left in when the menu gets 
 installed, try commenting out all the old menu css from template
 MozreplGuy wrote:Thanks for your response and your time! I apologize, I still 
 have everything on localhost. This following is what I could see with firebug 
 li class=parent active item1 a class=sf-with-ul 
 href=http://localhost/testsite/; spanHome/span span 
 class=sf-sub-indicator »/span /a Does this help a bit? It doesn't seem 
 to be a width problem, because there is plenty of space in the accordion list 
 (horizontally). If the  character were in the same span as home, then it 
 would be in the same line. What do you think? On Dec 1, 6:22 pm, 
 Charliecharlie...@gmail.comwrote:likely a width setting on LI or A 
 tags, likely from old css as superfish default css doesn't set widths. If 
 text was just fitting before then you are now adding a new element that 
 doesn't fit without wrapping to next line Can see a lot if you provide link, 
 easy to see what's happening with a DOM inspector MozreplGuy wrote:Hi all, I 
 successfully included superfish into a joomla site (still on localhost). I 
 use it in vertical mode. It works fine. But there is one thing that doesn't 
 look very nice. Every menu with a sub menu has a sub-indicator '' 
 (character 187, enabled by autoarrow flag). The indicator itself is fine. 
 However the indicator doesn't appear on the same line as the menu text. For 
 example it looks like: Menu1But I would like it to like: Menu1  Does 
 anybody have an idea how I could achieve that. I looked at the code (e.g. 
 superfish), but my skill level doesn't allow me to find a solution :-) I 
 would appreciate any help. Thanks, Mozrepl


[jQuery] Re: superfish accordion/vertical mode: How to make a node/menu stay open?

2009-12-03 Thread MozreplGuy
A solution can be found here:
http://joomla.lifeofcy.com/viewtopic.php?f=2t=208

On Dec 1, 9:24 pm, MozreplGuy mozr...@gmail.com wrote:
 I used the following plugin for 
 joomla:http://extensions.joomla.org/extensions/structure-a-navigation/menu-s...

 This module simply combines superfish with the main menu and automates
 the setup configuration. I configured it so it appears vertically
 (accordion).

 It looks very nice and works fine. Except for one small detail. If
 somebody clicks on a sub-menu and the page changes to that item. Then
 the whole menu collapses again (accordion closes). If you hover
 along the menu path you can see that the current item is correctly
 highlighted, however when you move the mouse away the accordion closes

 Is there a way so that the accordion staysopenwith current item
 highlighted?

 Thank you very much again for your time and help in advance!


[jQuery] Dynamic form cloning throws instance errors... Fix name or selector?

2009-12-03 Thread k...@beza
I've started creating a dynamic form using this plugin
http://code.google.com/p/jquery-dynamic-form/

As you can see, I can add/remove products/services from the invoice
http://i45.tinypic.com/2emfuox.jpg

The div I clone (div_item) contains 4 fields. When I clone the div,
its 4 fields are renamed (including fields in the original div) and
numbers are added to their id/name

Problems:

1) One of the fields div_item is a datePicker (jQueryUI plugin).
When I want to refer or use it, I get these errors:
* inst is undefined
* uncaught exception: Missing instance data for this datepicker
This is correct, because original field name/id were renamed, and I
guess the instance reference was lost

2) Which jQuery selector should I use so I can use correctly the
datePicker plugin in each cloned datePickerFieldX?

3) Other field in div_item should be an autocomplete field -
plugin- ... same happens, how should I fix its name, id, or selector
so the ajax autocomplete works in ever cloned field?

Thanks, and sorry for long post


[jQuery] Re: slideToggle stops working after refreshing content with Ajax

2009-12-03 Thread jpcozart
Glad to see it is now included in the librry.  Thanks!

Jeremy

On Nov 29, 5:48 am, Mauricio \(Maujor\) Samy Silva
css.mau...@gmail.com wrote:
 jQuery 1.3 version introduces an event method called live() that resolves 
 this issue.
 Sice that version you don't need the *livequery plugin* never more.

 See:http://docs.jquery.com/Events/live

 Regards

 Maurício
   -Mensagem Original-
   De: Sala
   Para: jQuery (English)
   Enviada em: sábado, 28 de novembro de 2009 23:28
   Assunto: [jQuery] Re: slideToggle stops working after refreshing content 
 with Ajax

   Thanks thanks so much

   I tried to rebind the event handlers  and for some reason that did not
   work.

   However, the plugin worked perfectly!

   Thanks once again, I spent days on this

   On Nov 28, 2:17 pm, jpcozart jeremy.coz...@gmail.com wrote:
    You can use the Live Query plugin to resolve this problem:
   
   http://docs.jquery.com/Plugins/livequery
   
    Or you can rebind the event handlers after the ajax call has updated
    the page. The new nodes do not have event handlers bound to them when
    they replace the old nodes:
   ...


[jQuery] Re: Selector issue

2009-12-03 Thread Civette
Well, actually my div 39, 40,  are returned in the cat_list
div from a previous ajax query. Numbers are in fact the autoincrement
id's in a mysql table.

Point is, on clicking each, to edit it.

That specific javascript part is returned by that ajax query.


[jQuery] IE javascript error Expected identifier, string or number but works as intended in FireFox

2009-12-03 Thread Brian Yanosik
I have the following code that works fine in FireFox but throws an error
that prevents it from working in IE.

The area that is throwing the error is bolded below. I am assuming is
something small I am missing.

Thanks for your help in advance.

$(document).ready(function () {

$(a.triggoverlay).click(function() {


destination = $(this).attr(href);
cta = $(this).attr(rel);

$(#overlay a).attr(href, destination);

flowplayer(a.fplayer,/flowplayer/flowplayer.commercial-3.1.0.swf,
{

key: '#...@xxx',
clip: {
scaling: 'fit',
*onCuepoint: [[-2000], function() {
if (cta) {
var myContent = this.getPlugin(myContent);

myContent.show();
myContent.setHtml(cta);
}
}]*
},
canvas: {
background: '#00',

backgroundGradient: 'none',
},
plugins: {
myContent: { url: '/flowplayer/flowplayer.content-3.1.0.swf',
top: 20,

width: 300,
borderRadius: 10, display: 'none'
}
}
});

$(#overlay).overlay({

closeOnClick: true,
finish:  {
top: 30
},
onBeforeLoad: function(content) {
this.getBackgroundImage().expose({color: '#444'});

this.getContent().find(a.fplayer).flowplayer(0).load();
},
onLoad: function(content) {

},
onClose: function(content) {

$.expose.close();
$f().unload();
$('#overlay').unbind().removeData();
}
});

$(#overlay).overlay().load();

return false;
});
});


[jQuery] Re: Superfish vertical/arrow question

2009-12-03 Thread MozreplGuy
Thanks for pointing me into the right direction. I changed
display:block to inline and I got what I wanted.

On Dec 3, 11:03 am, MozreplGuy mozr...@gmail.com wrote:
 Charlie, thank you for your time.
 I agree it would be easier with a link.
 I will get some hosting and move my stuff from localhost to there.
 Then I will post a link.
 Thanks again for taking the time to help a newbie like me!

 On Dec 2, 4:43 am, Charlie charlie...@gmail.com wrote:



  snippets of html won't do much to troubleshoot.    95% likelihood the 
  problem is css related and css needs to be viewed in the DOM to work with 
  effectively.
  The majority of posts regarding superfish on this board are Joomla related 
  . You can try searching. The original css gets left in when the menu gets 
  installed, try commenting out all the old menu css from template
  MozreplGuy wrote:Thanks for your response and your time! I apologize, I 
  still have everything on localhost. This following is what I could see with 
  firebug li class=parent active item1 a class=sf-with-ul 
  href=http://localhost/testsite/; spanHome/span span 
  class=sf-sub-indicator »/span /a Does this help a bit? It doesn't 
  seem to be a width problem, because there is plenty of space in the 
  accordion list (horizontally). If the  character were in the same span as 
  home, then it would be in the same line. What do you think? On Dec 1, 
  6:22 pm, Charliecharlie...@gmail.comwrote:likely a width setting on LI 
  or A tags, likely from old css as superfish default css doesn't set 
  widths. If text was just fitting before then you are now adding a new 
  element that doesn't fit without wrapping to next line Can see a lot if you 
  provide link, easy to see what's happening with a DOM inspector MozreplGuy 
  wrote:Hi all, I successfully included superfish into a joomla site (still 
  on localhost). I use it in vertical mode. It works fine. But there is one 
  thing that doesn't look very nice. Every menu with a sub menu has a 
  sub-indicator '' (character 187, enabled by autoarrow flag). The 
  indicator itself is fine. However the indicator doesn't appear on the same 
  line as the menu text. For example it looks like: Menu1But I would like it 
  to like: Menu1  Does anybody have an idea how I could achieve that. I 
  looked at the code (e.g. superfish), but my skill level doesn't allow me to 
  find a solution :-) I would appreciate any help. Thanks, Mozrepl- Hide 
  quoted text -

 - Show quoted text -


[jQuery] Re: Selector issue

2009-12-03 Thread MorningZ
if those div's are dynamically added, which it sounds like is the
case, then the new div's do not get wired automatically...   -
this is easily the most common trip-up seen on this mailing list

Event Delegation would be your friend here

http://jsbin.com/ivivo/edit

that way the container event cat_list has the event and you can add/
remove children from it as you please


On Dec 3, 4:10 pm, Civette la.cive...@gmail.com wrote:
 Well, actually my div 39, 40,  are returned in the cat_list
 div from a previous ajax query. Numbers are in fact the autoincrement
 id's in a mysql table.

 Point is, on clicking each, to edit it.

 That specific javascript part is returned by that ajax query.


[jQuery] jQuery expand/collapse incorrectly moving other page elements

2009-12-03 Thread ironwil

I've put together a couple of extensions for jQuery, but they're not original
or new in the least. Here's one:

jQuery.fn.fadeToggle = function(speed, easing, callback)
{
return this.animate({ opacity: 'toggle' }, speed, easing, callback);
}

Anyway, this works really well, except that it 'jostles' the page elements
that are beneath the page element being toggled, which completely ruins the
user experience. I'd like to know how to keep the other page elements from
being visibly moved when I use these functions. I would guess that there is
some padding or margin being added at some point to allow for the animation,
and if there is a CSS rule I could add to give it enough space so as not to
cause the 'jostle' effect, I would appreciate if someone would share it with
me.
-- 
View this message in context: 
http://old.nabble.com/jQuery-expand-collapse-incorrectly-moving-other-page-elements-tp26633916s27240p26633916.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: next()

2009-12-03 Thread jpcozart
I would have to see the structure of the document to know where the
problem lies.  It seems as though

country.next(select.state);

is not returning the node you are looking for.



On Dec 3, 1:07 pm, TMNT tmand...@gmail.com wrote:
 Matt, thanks for your response.

 I had originally posted this on jquery-dev group but was referred to
 this group.
 How do I access the id of the jquery object returned from the next()
 function?
 I tried Matt's suggestion below but I get an 'undefined' when I alert
 state.attr('id').
 thank you.

 From: Matt Maxwell leftwithoutli...@gmail.com
 Date: Thu, 3 Dec 2009 05:28:48 -0600
 Local: Thurs, Dec 3 2009 3:28 am
 Subject: Re: [jquery-dev] Re: next()
 Reply | Reply to author | Forward | Print | Individual message | Show
 original | Report this message | Find messages by this author

 I would do something like

 $(select.country).change(function () {
 var country = $(this),
 country_id = country.attr(id),
 state = country.next(select.state);

 });

 state isn't the DOM element, it's the jQuery object, so you'd have to
 go
 alert(state.attr(id));

 Hope this helps.

 Also, I agree with Dave, this isn't the place for this kind of
 question.

 - Hide quoted text -
 - Show quoted text -
 On Wed, Dec 2, 2009 at 6:20 PM, Dave Methvin dave.meth...@gmail.com
 wrote:



  The jQuery-en group is a better fit for this question. This group is
  for the discussion of the development of jQuery itself.
  --


[jQuery] Re: Selector issue

2009-12-03 Thread Civette
I'll test it tomorrow.

Thx for answer


[jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-03 Thread Dave Methvin
 I refrained from replying because the OP seemed trollish, but he has a
 point, IMHO.

It would be great if someone who knew both frameworks could set up a
page that demonstrated a side-by-side case where Mootools has smoother
animations than jQuery. Otherwise it's hard do know what might be
causing the problem, or even whether there's a problem at all.


[jQuery] validate - How to dynamically set required:true to required:false

2009-12-03 Thread Ken
I am dynamically changing the className from required:true to
required:false but jquery.validate.js always is displaying that this
field is required.

function change_required(id,bRequired) {
document.getElementById(id).className=
(bRequired?'{required:true}':'{required:false}')
}

Before submit I see that input fields whose className is dynamically
set to {required:false} is still be treated by jquery.validate.js as
if  {required:true}

This is the call to validate for the form:
jQuery(document).ready(function() {
jQuery(#form_id).validate(
{
  errorClass: form_error,
  errorElement: div,
  wrapper: span
});
})

How do I set a rule to ONLY validate when the className has
required:true?


Re: [jQuery] IF and NULL. Please, could someone help me out?

2009-12-03 Thread brian
Does this work?

$(#JPlayer).jPlayer({
ready: function() {
var cookie = $.cookies.get(AlliedSkills.Player);
$(this).setFile($('#MusicPath').attr(value))

if (cookie == Play)
{
$(this).play();
}
},
swfPath: $('#JPlayerPath').attr(value)
});


Note the '==' (not '=').

On Wed, Dec 2, 2009 at 7:20 PM, shapper mdmo...@gmail.com wrote:
 Hello,

 I have the following:

  $(#JPlayer).jPlayer({
    ready: function() {
      $(this).setFile($('#MusicPath').attr(value)).play();
    },
    swfPath: $('#JPlayerPath').attr(value)
  });

 I would like the play the file:
 $(this).setFile($('#MusicPath').attr(value)).play();

 Only if ( $.cookies.get(AlliedSkills.Player) = Play )

 If ($.cookies.get(AlliedSkills.Player) is null then do not play and
 set only the file:
 $(this).setFile($('#MusicPath').attr(value));

 Could someone please help me in doing this?

 Thanks,
 Miguel



Re: [jQuery] Hide Table Row - Fundamentally I'm wrong.

2009-12-03 Thread Karl Swedberg
Does it not work in every browser, or just in IE? If just IE, the  
problem could be related to a problem with certain table elements  
showing a height even when hidden (jQuery 1.3.2 looks for height/width  
values to determine visibility).


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Dec 1, 2009, at 4:17 PM, mickey wrote:


Hi,

I am trying to simply hide / show the body of a table with toggle().
The hide seems to work but the show doesn't. e.g. header is clicked -
hide / header is clicked again - nothing.

This is my code

$('#myTable th').click(function() {
 $('tbody').toggle();
});

Thing is I know something is wrong but I'm not savvy enough yet to
recognise what!  Do I need to traverse the dom?

Any ideas?

Thanks.




Re: [jQuery] binding ala ActionScript??

2009-12-03 Thread Karl Swedberg
I've never actually tried this plugin myself, but it looks like it  
might help you do what you're asking about:


http://wiki.github.com/raid-ox/chain.js/

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Dec 2, 2009, at 1:16 PM, hsfrey wrote:


Do jQuery or JavaScript provide any facility like the data-binding
facility of ActionScript, whereby changing a variable immediately
applies the changed value throughout the program?

Apparently that works by implementing an onChange event whenever the
variable is changed.




Re: [jQuery] Re: Stop a button within an li taking the li event?

2009-12-03 Thread Karl Swedberg


On Dec 3, 2009, at 7:24 AM, Rich wrote:


... not sure
what you mean by an input not allowed to be a child of a form though??


For valid markup, an input can be a descendant of a form element, but  
not a direct child.


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com



Re: [jQuery] Re: Why mootools animations is more smooth than jquery?

2009-12-03 Thread Karl Swedberg


On Dec 3, 2009, at 7:31 PM, Dave Methvin wrote:

I refrained from replying because the OP seemed trollish, but he  
has a

point, IMHO.


It would be great if someone who knew both frameworks could set up a
page that demonstrated a side-by-side case where Mootools has smoother
animations than jQuery. Otherwise it's hard do know what might be
causing the problem, or even whether there's a problem at all.


That's a great idea, Dave.

I wonder how much the easing equation affects people's perception of  
smoothness. It might be worthwhile to try animations using the  
easing plugin and see if any of those equations feel smoother.


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com



[jQuery] Automagically link http(s)://, mailto: etc in String

2009-12-03 Thread Scott Wilcox
Hello Folks,

I'm usually pretty good at Googling and finding my own answers to
problems, however this one has left me a little stumped. Is it
possible either using JQuery, a plugin or standard JS to automagically
create links for URI's within a string?

I'm having a complete block trying to figure this out.

Thanks for reading,

Scott.


[jQuery] An effect like press75's Massive News theme

2009-12-03 Thread Omer
Greetingz people,

check this out: http://www.press75.com/demos/massive-news/

I like the effect happens when you hover one of the four featured
articles on the top of the page - the way the description appears from
below and everything 

I'm trying to imitate the exact same effect but so far i only managed
to get lost in their endless maze of overlapping CSS styles...

Does someone know how can i achieve this? can anyone point me to any
article/tutorial/howto that might help?

Thanks in advance!

regards
O.


[jQuery] SuperFish Menu

2009-12-03 Thread Alvin
I used Superfish on other website (www.dapuri.com) and it works well.
When I try to integrate it to this website, it doesn't work.

Please click the link below and take a look (this is a testing page,
ignore the standard menu on the left)
http://www.avplannersinc.com/index.php/privacy-a-policy

As you can see, only the title Superfish menu is shown, while the
menu (MAIN MENU  its SUBMENU) is not shown. I try to disable the
Standard menu, disable the banner, etc but DIDNT work.

Any advice?

Alvin Ooi


[jQuery] Superfish: drop down slide down / slide up effect - how to?

2009-12-03 Thread Dasher
Hello,

I have just discovered superfish - it is awesome - the jquery
interaction is great.

Is it possible to have the superfish drop down items slide down and
slide up like the menu on this page?
http://spicebrains.com/multi-level-drop-down-menu/#examples

I really love that effect and have seen it on a number of sites before
and always thought it looked cool.

My current menu seems to show and hide the drop down items and uses
the following code.

$('ul.sf-menu').superfish({
delay:   1000,
animation:   {opacity:'show',height:'show'},
speed:   100,
autoArrows:  true,
dropShadows: true
});

Thanks in advance.


[jQuery] Superfish: width of top level links - great with js off - too wide with js on

2009-12-03 Thread Dasher
Hello,

I am setting up my first superfish menu and having an issue with the
width of the top level link tabs.

When javascript is off, the width of the top level links look exactly
how I want them - with flexible width to accomodate the link text and
7px padding either side.

When javascript is on, extra width seems to be added to the top level
links - I am not sure what is causing it. It does get it right for the
active state (which is wierd because there is no width for that in the
css either).

Here is a visual:
http://www.gocreate.com.au/superfish-menu-spacing.jpg

So what I am wanting to do is stop jquery / superfish adding extra
width to the menu so that it looks the same with js on or off.

The only widths mentioned in the css are as follows but changing these
to auto does not have any effect on the width of the links:
.sf-menu ul { position: absolute; top: -999em; width: 12em; }
.sf-menu ul li { width: 100%; }

My javascript knowledge is very limited (I am a css'er) - with a bit
of googling and the more user friendly nature of jquery, I found some
tricks that I could try but as yet have been unable to solve it.

My base code is as follows:

$(ul.sf-menu).supersubs({
minWidth:8,
maxWidth:13,
extraWidth:  1
}).superfish();

$('ul.sf-menu').superfish({
delay:   1000,
animation:   {opacity:'show',height:'show'},
speed:   100,
autoArrows:  true,
dropShadows: true
});

  $('ul.sf-menu  li  a span').remove();   
// remove arrows from
top level links

The same thing happens with or without using the supersubs plugin.

Adding this does reduce the width of each link but it makes all top
level links the same width - so that's not suitable:
$(.sf-menu li).css(width,100px);

Adding any of these variations do not seem to do anything (the idea
being to reduce any width setting that jquery may 'secretly' be
adding):
$('ul.sf-menu li').css('width', '');
or
$(ul.sf-menu li).css(width,);
or
$('ul.sf-menu li')[0].style.width = '';
or
$('ul.sf-menu li').style.removeAttribute(width, false);

Then I thought maybe I could add a class to the top level links with
jquery and set width:auto in the css for the class but that does not
seem to solve it either:
$(ul.sf-menu li).addClass(jq-wfix);

So now I am scratching my head...

Any ideas?

Thanks in advance.


Re: [jQuery] Automagically link http(s)://, mailto: etc in String

2009-12-03 Thread Dhruva Sagar
Of course it's possible :). All you need to do is know a little bit of
regular expressions  that's pretty much it, you could use simple javascript
as well if you like.

Thanks  Regards,
Dhruva Sagar.




On Fri, Dec 4, 2009 at 6:09 AM, Scott Wilcox sc...@tig.gr wrote:

 Hello Folks,

 I'm usually pretty good at Googling and finding my own answers to
 problems, however this one has left me a little stumped. Is it
 possible either using JQuery, a plugin or standard JS to automagically
 create links for URI's within a string?

 I'm having a complete block trying to figure this out.

 Thanks for reading,

 Scott.



Re: [jQuery] An effect like press75's Massive News theme

2009-12-03 Thread Dhruva Sagar
Well it's actually a very simple / basic effect...
You could have a div with background image and have some text div over it
which is hidden by default and on mouse hover simply show / make that div
appear using any of the various jquery-ui effects available...and make it go
away (hide it) when the mouse goes out...

Thanks  Regards,
Dhruva Sagar.




On Fri, Dec 4, 2009 at 7:01 AM, Omer omer.l...@gmail.com wrote:

 Greetingz people,

 check this out: http://www.press75.com/demos/massive-news/

 I like the effect happens when you hover one of the four featured
 articles on the top of the page - the way the description appears from
 below and everything 

 I'm trying to imitate the exact same effect but so far i only managed
 to get lost in their endless maze of overlapping CSS styles...

 Does someone know how can i achieve this? can anyone point me to any
 article/tutorial/howto that might help?

 Thanks in advance!

 regards
 O.



[jQuery] Re: next()

2009-12-03 Thread TMNT
Thank you jpcozart. here's part of my html:

div class=form-item id=edit-question-900-wrapper
 label for=edit-question-900Country of ED Submitter span
class=form-required title=This field is required.*/span: /
label
 select name=question_900 class=form-select country
disabled=disabled id=edit-question-900 option value=-- Select
country --/optionoption value=1039 selected=selectedCanada/
optionoption value=Kazakhstan/optionoption
value=1177Russian Federation/optionoption
value=1191Singapore/optionoption value=1193Slovenia/
optionoption value=1196South Africa/optionoption
value=1228United States/option/select
/div
div class=form-item id=edit-question-898-wrapper
 label for=edit-question-898State or Region of ED Submitter span
class=form-required title=This field is required.*/span: /
label
 select name=question_898 class=form-select state
disabled=disabled id=edit-question-898 option value=-- Select
one --/optionoption value=1100 selected=selectedAlberta/
optionoption value=1101British Columbia/optionoption
value=1102Manitoba/optionoption value=1103New Brunswick/
optionoption value=1104Newfoundland and Labrador/optionoption
value=1105Northwest Territories/optionoption value=1106Nova
Scotia/optionoption value=1107Nunavut/optionoption
value=1108Ontario/optionoption value=1109Prince Edward
Island/optionoption value=1110Quebec/optionoption
value=Saskatchewan/optionoption value=1112Yukon
Territory/option/select
/div



On Dec 3, 2:24 pm, jpcozart jeremy.coz...@gmail.com wrote:
 I would have to see the structure of the document to know where the
 problem lies.  It seems as though

 country.next(select.state);

 is not returning the node you are looking for.

 On Dec 3, 1:07 pm, TMNT tmand...@gmail.com wrote:

  Matt, thanks for your response.

  I had originally posted this on jquery-dev group but was referred to
  this group.
  How do I access the id of the jquery object returned from the next()
  function?
  I tried Matt's suggestion below but I get an 'undefined' when I alert
  state.attr('id').
  thank you.

  From: Matt Maxwell leftwithoutli...@gmail.com
  Date: Thu, 3 Dec 2009 05:28:48 -0600
  Local: Thurs, Dec 3 2009 3:28 am
  Subject: Re: [jquery-dev] Re: next()
  Reply | Reply to author | Forward | Print | Individual message | Show
  original | Report this message | Find messages by this author

  I would do something like

  $(select.country).change(function () {
  var country = $(this),
  country_id = country.attr(id),
  state = country.next(select.state);

  });

  state isn't the DOM element, it's the jQuery object, so you'd have to
  go
  alert(state.attr(id));

  Hope this helps.

  Also, I agree with Dave, this isn't the place for this kind of
  question.

  - Hide quoted text -
  - Show quoted text -
  On Wed, Dec 2, 2009 at 6:20 PM, Dave Methvin dave.meth...@gmail.com
  wrote:

   The jQuery-en group is a better fit for this question. This group is
   for the discussion of the development of jQuery itself.
   --


[jQuery] jQuery and ASP.Net server listbox control

2009-12-03 Thread john6630
I am trying to use jQuery to move items between one ASP.Net listbox
control and another. The jQuery works great but when I post back and
access the listboxes in my codebhind, the items remain in the same
listboxes as when the page was open. I am thinking this is because of
ASP.Net maintaining the view state on the server controls and that
this approach is not valid.

Can someone confirm if this is the case or if not, what I have to do
to make the code work. Here is the jQuery I am using:

$('#add').click(function() {
return !$('#ListBox1 option:selected').remove().appendTo
('#ListBox2');
});
$('#remove').click(function() {
return !$('#ListBox2 option:selected').remove().appendTo
('#ListBox1');
});

And here are the ASP controls:

asp:ListBox ID=ListBox1 runat=server Height=171px
SelectionMode=Multiple Width=152px
asp:ListItemItem 1-1/asp:ListItem
asp:ListItemItem 2-1/asp:ListItem
asp:ListItemItem 3-1/asp:ListItem
asp:ListItemItem 4-1/asp:ListItem
/asp:ListBox

asp:ListBox ID=ListBox2 runat=server Height=171px
SelectionMode=Multiple Width=152px
asp:ListItemItem 1/asp:ListItem
asp:ListItemItem 2/asp:ListItem
asp:ListItemItem 3/asp:ListItem
asp:ListItemItem 4/asp:ListItem
/asp:ListBox

Here is my codebhind on a button that is used to read the modified
lists and take some action (in this case just report back the list
items):

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim strResult As String = LB1: 
Dim i As Integer
For i = 0 To ListBox1.Items.Count - 1
strResult += ListBox1.Items(i).Text  /
Next
strResult +=  ** LB2: 
For i = 0 To ListBox2.Items.Count - 1
strResult += ListBox2.Items(i).Text  /
Next
Result.Text = strResult
End Sub

As I mentioned, the jQuery works great. I can move item s from ListBox
1 to ListBox2 but the displayed lists are not the ones I can access in
the code behind.

TIA
John


[jQuery] (autocomplete) remove hidden variable on bad input

2009-12-03 Thread dgm
How would one go about removing a hidden variable when the
autocomplete is left invalid?

I tried:

$(.autocomplete_search).result(function(event, data, formatted) {
if (data)
$(this).next().val(data[1]);
else
  $(this).next().val('');
});


But I think result doesn't get fired if the textbox loses focus
without selecting a valid value.



[jQuery] drop down error

2009-12-03 Thread test11

I am using  superfish for dropdown menu.But during the page load before the
image has been loaded all the drop down menus are getting visible.Can this
be hide.please give me reply ASAP. 

Thanks in Advance
-- 
View this message in context: 
http://old.nabble.com/drop-down-error-tp26635792s27240p26635792.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Selector issue

2009-12-03 Thread Civette
Is your issue  description linked to this :

http://forum.jquery.com/viewtopic.php?f=2t=1000sid=7932d86732f0126e2c4ad3f5e92baa4d

Same thing ?

On Dec 3, 10:52 pm, MorningZ morni...@gmail.com wrote:
 if those div's are dynamically added, which it sounds like is the
 case, then the new div's do not get wired automatically...   -
 this is easily the most common trip-up seen on this mailing list

 Event Delegation would be your friend here

 http://jsbin.com/ivivo/edit

 that way the container event cat_list has the event and you can add/
 remove children from it as you please

 On Dec 3, 4:10 pm, Civette la.cive...@gmail.com wrote:

  Well, actually my div 39, 40,  are returned in the cat_list
  div from a previous ajax query. Numbers are in fact the autoincrement
  id's in a mysql table.

  Point is, on clicking each, to edit it.

  That specific javascript part is returned by that ajax query.