I noticed that with the jQuery library 1.2.1, used by the person who made this example: http://www.javascripttoolbox.com/jquery/, everything works perfectly well also with IE 8.
On 29 Lug, 15:49, Fontzter <[email protected]> wrote: > I think this may be an bug with IE8. I put together a simple test > page to demo it. I will post this on the main jQuery group too. > > http://jsbin.com/ijini > > Dave > > On Jul 28, 5:08 pm, Mondo Libero <[email protected]> wrote: > > > Thanks for your reply, i know It's a little tough to track, i have > > more difficult because i'm not expert on js/jquery. > > > I do the first thing you tell me: $('tr.child-'+this.id).toggle(); > > > This is a better way, but the i still have the problem with IE 8. > > > Then i try 2nd modify and the code run correctly on IE 8. I think is a > > bug of toggle() function or not? > > > For now i rewrite the code to hide/show using hide(), show() function: > > > <script> > > $(function() { > > $('td.title') > > .click(function(){ > > > if > > ($('div.visualizza'+this.id).css('background-image').search(/ > > frecciadown.png/)!=-1 ) { > > $('div.visualizza'+this.id).css > > ('background-image', "url(default.asp_files/images/frecciaup.png)"); > > > > $('div.visualizza'+this.id).attr("title","Nascondi i contenuti"); > > > > $('tr[alt^=bottom'+this.id+']').show(); > > $('tr.child-'+this.id).show(); > > } else { > > $('div.visualizza'+this.id).css > > ('background-image', "url(default.asp_files/images/frecciadown.png)"); > > > > $('div.visualizza'+this.id).attr("title","Mostra i contenuti"); > > > > $('tr[alt^=bottom'+this.id+']').hide(); > > $('tr.child-'+this.id).hide(); > > } > > > }); > > $('div.[class^=visualizza]').css > > ("cursor","pointer"); > > > > $('div.[class^=visualizza]').css("background-image", "url > > (default.asp_files/images/frecciadown.png)"); > > $('div.[class^=visualizza]').attr("title","Mostra i > > contenuti"); > > $('tr[class^=child-]').hide().children('td'); > > $('tr[alt^=bottomriga]').hide(); > > }); > > </script> > > > The test page with this mod is still here:http://www.pubblimedia.com/Test/ > > > Let me know if there are some news about this problem with toggle() > > function and when i can remove the page from server. > > > Thanks for all. > > > On 28 Lug, 19:11, Fontzter <[email protected]> wrote: > > > > Hi, > > > > It's still a little tough to track what is going on. Here are a few > > > things to try: > > > > You can just get the rows that you want to show without referencing > > > the siblings. I think this is the line of code that may be causing > > > your troubles: > > > > $('tr').siblings('.child-'+this.id).toggle(); > > > > $('tr) is saying give me all TRs, then it is asking for siblings of > > > all those TRs that have a class of 'child-XXX'. It would be much > > > bettter to just get the trs with that class directly like this: > > > > $('tr.child-'+this.id).toggle(); > > > > I think making this change might fix the issue. If not, try doing > > > a .show() instead of .toggle() to test if there are any issue there. > > > > Let me know if that fixes it. > > > > Hth, > > > > Dave > > > > On Jul 28, 12:17 pm, Mondo Libero <[email protected]> wrote: > > > > > Thanks for your help. The site you give me is worderful, i've never > > > > seen it before! > > > > > I try to publish the html output on this link, adding the absolute > > > > reference to my server, but it do not run. > > > > > I save the html source and publish it here for > > > > testing:http://www.pubblimedia.com/Test/ > > > > > - this.id in my qyery code is rigaN, where N is the number of > > > > category, unique in database. > > > > > Thanks for your help, have a nice day! > > > > > On 28 Lug, 15:53, Fontzter <[email protected]> wrote: > > > > > > Hi, > > > > > > There is a lot going on in your pasted code. Your code seems to set > > > > > elements to child-riga... and you are just looking for child-... in > > > > > your jquery code. I could be wrong though. You will need to provide > > > > > a simpler example (just the html produced by your server-side code). > > > > > Putting it onhttp://jsbin.comwouldbeabighelp. > > > > > > Dave > > > > > > On Jul 27, 3:44 pm, Vincenzo Ferme <[email protected]> wrote: > > > > > > > Hi, i’m Vincenzo, a web developer from Italy. I use your ajax code > > > > > > following the guide ad the > > > > > > example:http://www.javascripttoolbox.com/jquery/?doctype=strict > > > > > > . I have some question about my work with your code, if can answer > > > > > > me. > > > > > > > Here the question: > > > > > > > The problem is that my code do not run on explorer 8, when I click > > > > > > on > > > > > > td where I apply the function, child td are not showed. > > > > > > > Here the code: > > > > > > > <% > > > > > > dim sqlcat, idcat, nome, pos, citta, indirizzo, telefono, cellulare, > > > > > > sito, mail, persona, arrivare, descrizione, tipologia, mappa, > > > > > > numcatpres > > > > > > > '----------------------------- ELENCO RISORSE > > > > > > -----------------------------' > > > > > > sub listRisorse() > > > > > > %> > > > > > > <br /> > > > > > > <h1>GESTIONE CATEGORIE/RISORSE</h1> > > > > > > <div id="notice"><%= request("notice") %></div> > > > > > > <p class="center"> > > > > > > <input type="button" value="Inserisci Nuova Categoria" > > > > > > onclick="window.location.href='<%= url %>?action=newcat'" /> > > > > > > <% > > > > > > 'Conto le categorie perchè il pulsante per > > > > > > aggiungere contenuti si > > > > > > deve attivare solo in caso vi siano categorie > > > > > > sqlcat="SELECT COUNT(*) AS numcatpres FROM > > > > > > Categorie" > > > > > > dbOpen(sqlcat) > > > > > > numcatpres=objRS("numcatpres") > > > > > > dbClose(true) > > > > > > if numcatpres<>0 then > > > > > > %> > > > > > > > > > > > > <input type="button" value="Inserisci Nuovo Contenuto" > > > > > > onclick="window.location.href='<%= url %>?action=new'" /> > > > > > > <% end if %> > > > > > > <!--Precarico le immagini necessarie--> > > > > > > <img src="../../images/frecciadown.png" style="display:none; > > > > > > visibility:hidden" /> > > > > > > <img src="../../images/frecciaup.png" style="display:none; > > > > > > visibility:hidden" /> > > > > > > <br /><br /> > > > > > > </p> > > > > > > <% > > > > > > > 'Seleziono le eventuali categorie presenti > > > > > > sqlcat="SELECT C.ID AS idcat, C.nome AS nome, C.pos AS pos > > > > > > FROM > > > > > > Categorie C ORDER BY C.pos" > > > > > > > dbOpen(sqlcat) > > > > > > > if not objRS.EOF then > > > > > > %> > > > > > > <script> > > > > > > $(function() { > > > > > > $('td.title') > > > > > > .click(function(){ > > > > > > > > > > > > $('tr').siblings('.child-'+this.id).toggle(); > > > > > > > if > > > > > > ($('div.visualizza'+this.id).css('background-image').search(/ > > > > > > frecciadown.png/)!=-1 ) { > > > > > > > > > > > > $('div.visualizza'+this.id).css('background-image', "url > > > > > > (/images/frecciaup.png)"); > > > > > > > > > > > > $('div.visualizza'+this.id).attr("title","Nascondi i contenuti"); > > > > > > > > > > > > $('tr[alt^=bottom'+this.id+']').toggle(); > > > > > > } else { > > > > > > > > > > > > $('div.visualizza'+this.id).css('background-image', "url > > > > > > (/images/frecciadown.png)"); > > > > > > > > > > > > $('div.visualizza'+this.id).attr("title","Mostra i contenuti"); > > > > > > > > > > > > $('tr[alt^=bottom'+this.id+']').toggle(); > > > > > > } > > > > > > > }); > > > > > > $('div.[class^=visualizza]').css("cursor","pointer"); > > > > > > > > > > > > $('div.[class^=visualizza]').css("background-image", "url(/images/ > > > > > > frecciadown.png)"); > > > > > > > > > > > > $('div.[class^=visualizza]').attr("title","Mostra i contenuti"); > > > > > > $('tr[class^=child-]').hide().children('td'); > > > > > > $('tr[alt^=bottomriga]').hide(); > > > > > > <% if request("cat")<> "" then %> > > > > > > $('tr[class^=child-riga<% > > > > > > =request("cat")%>]').toggle(); > > > > > > $('tr[alt^=bottomriga<% > > > > > > =request("cat")%>]').toggle() > > > > > > $('div.visualizzariga'+<% > > > > > > =request("cat")%>).attr("title","Nascondi > > > > > > i contenuti"); > > > > > > $('div.visualizzariga'+<% > > > > > > =request("cat")%>).css('background- > > > > > > image', "url(/images/frecciaup.png)"); > > > > > > > > ... > > leggi tutto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
