[jQuery] Re: Can't understand why this won't work

2008-12-04 Thread Marcelo Wolfgang





Hi, sorry my mistake, I've pasted the wrong part of the code :/

this is the relevant info:


 
 
 


forget about the 

Thanks for spotting this


On 4/12/2008 16:17, MorningZ wrote:

  Your selector

$("#homeMenu A.colecao").click(function(e){
alert('menu');
});

says:  give me all  tags with the class of "colecao" inside the
object 'homeMenu'

but inside the HTML you show, there is no object with the ID of
"homeMenu", nor are there any  tags with a class of "colecao", so
the selector would bring back nothing to attach the event to



On Dec 4, 12:15 pm, Marcelo Wolfgang <[EMAIL PROTECTED]> wrote:
  
  
Hi all,

I'm developing an iphone oriented site, and I'm having some problem
with the click event not firing ( and I think is mine selectors who
are wrong ) can anyone help me figure out?

Heres the jscript:

$("#homeMenu A.colecao").click(function(e){
        alert('menu');});

$("#brindesMenu, #colecaoMenu, #repMenu").toggleClass('hide'); // this
works
$("#menuRowA[href=''],#homeMenu A
[href='']").click(function(e){
        alert('colecao');
        pageTracker._trackPageview('/iphone/colecao');})

$("#menuRowA[href=''],#homeMenu A
[href='']").click(function(e){
        alert('brindes');
        pageTracker._trackPageview('/iphone/brindes');})

$("#menuRowA[href='']").click(function(e){ // tried this to
see if the problem was the multiple selectors
        alert('representantes');
        pageTracker._trackPageview('/iphone/representantes');

})

heres the html:


                
                
                
                


        
                
                
                
        


TIA
Marcelo Wolfgang

  
  
  






[jQuery] Can't understand why this won't work

2008-12-04 Thread Marcelo Wolfgang

Hi all,

I'm developing an iphone oriented site, and I'm having some problem
with the click event not firing ( and I think is mine selectors who
are wrong ) can anyone help me figure out?

Heres the jscript:

$("#homeMenu A.colecao").click(function(e){
alert('menu');
});
$("#brindesMenu, #colecaoMenu, #repMenu").toggleClass('hide'); // this
works
$("#menuRowA[href='colecao.html'],#homeMenu A
[href='colecao.html']").click(function(e){
alert('colecao');
pageTracker._trackPageview('/iphone/colecao');
})
$("#menuRowA[href='brindes.html'],#homeMenu A
[href='brindes.html']").click(function(e){
alert('brindes');
pageTracker._trackPageview('/iphone/brindes');
})
$("#menuRowA[href='rep.html']").click(function(e){ // tried this to
see if the problem was the multiple selectors
alert('representantes');
pageTracker._trackPageview('/iphone/representantes');
})

heres the html:















TIA
Marcelo Wolfgang


[jQuery] replacing content with .get madness

2008-11-04 Thread Marcelo Wolfgang

Hi all,

I'm trying to change some html inside a div with ajax, after the user
change the value of a drop down, but I 'cant make it work, it has been
some time I've last coded with jquery and it seems I'm a bit rusted,
can someone help me please? I've banging my head on this for the some
time now

here's my js:

$(document).ready(function(){
 $("select").change(getData);
 function getData() {
 var idRep = $("#estados").val();
alert($('repDesc').html()) // returns null ()
$('repDesc').empty()
alert($('repDesc').html())  // returns null (???)
$.get("get_representantes.php?idRep="+idRep,  function(data){
 alert("Data Loaded: " + data); // show the correct data
 $("repDesc").empty();
 $("repDesc").append(data);
 $("repDesc").after( data )
});
 }
});

and the html is very simple :


COSTA RICA
CALÇADOS BOTTERO LTDA.Charles A. Werb
R. Armindo Schimidt, 676CEP: 95630-000 -
Perobé - RSFone


if you want to see it live you can check out
http://www.bottero.net/iphone/rep_br.html

TIA
Marcelo Wolfgang


[jQuery] Can't make a .click to work

2008-06-19 Thread Marcelo Wolfgang

Hi list

I'm having a problem with a simple .click function, can anyone hint me
on what I'm doing wrong?

Here's the code I'm using:

//this works
$("#aboutIs").load("/
zerocincoe.php"); //to get the first quote

//this works
$("span#reload img").hover(function () {
 $(this).css({'cursor':'pointer'});
})

//this don't work, I can't even get the alert to show up;
$("span#reload img").click(function () {
$("#aboutIs").load("/
zerocincoe.php");
alert('a');
});

I get this error on FF Error console (using 1.2.6 unpacked):
Error: handler is undefined
Source File: http://zerocinco.com.br/code/wp-content/themes/zerocinco/jquery.js
Line: 1834

If I use the packed version I get:
Error: g is undefined
Source File: http://zerocinco.com.br/code/wp-content/themes/zerocinco/jquery.js
Line: 11

TIA
Marcelo Wolfgang


[jQuery] Re: [OT] twitter

2008-05-20 Thread Marcelo Wolfgang

I use Snitter with is a client that runs over Adobe AIR ( and you can 
try others, there are at least 3 different clients) or you can use only 
the website, subscribe to the jquery user and recieve updates by sms ( 
if you are able to)

Marcelo Wolfgang

Alexandre Plennevaux wrote:
> hi friends,
>
> now that jquery uses twitter, i might give twitter a chance. Can you 
> recommend a good way to use it? A twitter client? Which?
> i'm a bit afraid of the "distraction" it brings. but using it in my 
> Greader is not very satisfactory. Any clue, welcomed !
>
>
> Thanks,
>
> -- 
> Alexandre Plennevaux
> LAb[au]
>
> http://www.lab-au.com 



[jQuery] Why this simple code isn't working

2007-12-14 Thread Marcelo Wolfgang

Hi all,

I'm banging my head on the keyboard here ... and couldn't figure out
why this isn't working I have the following code:

HTML:

Coleção:

Escolha uma coleção
Primavera Verão 2008
Primavera Verão 2008



Linha:

escolha uma coleção



JS:
$("#select_colecao").change(function(){
var colecaoId = this.value;
$.get("act/act_linhas_na_colecao.php", {colId:colecaoId},
function(data){
alert($("#add_linha").html())// outputs escolha uma
coleção
alert(data)// outputs 78900 - 
Flex
80900 - Multi
$("#add_linha").emtpy().append(data); // nothing happens
});
});

Can anyone shed some light why it doesn't works ?

TIA


[jQuery] find and replace text in a variable

2007-12-13 Thread Marcelo Wolfgang

Hi all,

I've a form with a numeric drop down ( from 1 to 10 ) and when the
user select a number from it, I want to add the corresponding number
of textfields in my code, but I need to change the input name and I
can't figure out how to do that this is what I have right now

$("#add_opcoes").change(function (){
var materias_num = this.value;
var loop = $("#fd_opcoes").html()
$("#fd_opcoes").empty()
for(var i = 1; i <= materias_num; i++){
$("#fd_opcoes").append(loop);
}
});

and this is what is inside loop


Material 1:



what I want is to change all the 1 that are inside the variable with i
from the looping ( so it will be 1, 2 ...10 )

is there a way to do that easily or should I look at other options ?

TIA
Marcelo Wolfgang


[jQuery] Re: Can figure out the diference between input button and button

2007-12-07 Thread Marcelo Wolfgang





Thanks a mix between the button type="button" and the tip about my form
beeing submit before the ajax help me figure out what was the problem.

Ryan wrote:

  My question has been hijacked with another!  :)


On Dec 6, 4:36 pm, "Jake McGraw" <[EMAIL PROTECTED]> wrote:
  
  
Perhaps try  instead of .

Haven't tested, but it looks like maybe your form is trying to submit before
the AJAX gets a chance to resolve.

- jake

On Dec 6, 2007 1:53 PM, Marcelo Wolfgang <[EMAIL PROTECTED]> wrote:





  Hi list
  


  Long time lurker, first time poster, so here it goes:
  


  I have a simple form that call a $.get, if I have a  my code works but if I have a  it
doesn't ... can anyone tell me what I'm doing wrong? here's the code:
  


 
   
   $(document).ready(function(){
   $("#btSubmit").click(function () {
  var id = $("#user_id").val();
  var number2 = $('#number2').attr('value');
  $.get("a_edit.php", { userid: id, number2: number2 },
  function(data){
 alert("Data Loaded: " + data);
 $("#edit_response").append(data);
  });
  });
   });
   
  


  and the html that works
  


 
   
   
   
   
  
    

  and the html that don't work:
  


 
   
   
   
   
  


  TIA
Marcelo Wolfgang
  

  
  
  






[jQuery] Can figure out the diference between input button and button

2007-12-06 Thread Marcelo Wolfgang

Hi list

Long time lurker, first time poster, so here it goes:

I have a simple form that call a $.get, if I have a  my code works but if I have a  it 
doesn't ... can anyone tell me what I'm doing wrong? here's the code:



$(document).ready(function(){
$("#btSubmit").click(function () {
   var id = $("#user_id").val();
   var number2 = $('#number2').attr('value');
   $.get("a_edit.php", { userid: id, number2: number2 },
   function(data){
  alert("Data Loaded: " + data);
  $("#edit_response").append(data);
   });
   });
});


and the html that works




    


and the html that don't work:







TIA
Marcelo Wolfgang


[jQuery] tablesorter: border problem with scroll on the tbody

2007-09-25 Thread Marcelo Wolfgang





Hi all, 

First time posting here, so please excuse me if I break something ;)
I'm developing for the firt time with jQuery, mostly because of the
tablesorter plugin, but I'm having a weird problem on the table in this
page:

http://www.zerocinco.com.br/clientes/bottero/catalogo/linha.html

In FF the border of the cells do not scroll with the body, and in IE 6
it won't even display the table.
Can someone give me some advice on how to fix this code?

TIA
Marcelo Wolfgang