[jQuery] Re: Creating a class using jQuery

2009-02-06 Thread ..:: sheshnjak ::..
I'm not sure if this is what you're looking for, but I think it should be satisfactory. Try to analize js.js file on my web site, I have some functions separated in jQuery.extend({ ... }) link: http://www.tomislavdekovic.iz.hr/dizajn/js.js ..:: sheshnjak ::.. www.tomislavdek

[jQuery] Re: slideToggle(); odd and even click

2009-02-06 Thread ..:: sheshnjak ::..
You should try this, and find your way through: http://www.learningjquery.com/2007/03/accordion-madness ..:: sheshnjak ::.. www.tomislavdekovic.iz.hr

[jQuery] Re: JQuery effects not working in Internet Explorer 6

2009-02-06 Thread ..:: sheshnjak ::..
First try to replace first line in code of your page with and see if it resolves anything. It could be only that, if not then try to validate your page (currently you have 20 warnings, no errors) and remove problems. I think it should do it. ..:: sheshnjak ::.. www.tomislavdekovic.iz.hr

[jQuery] Re: Newbie traversal question

2008-10-14 Thread ..:: sheshnjak ::..
> is there a way to recursively roll out until you reach a parent > that matches a given id? Here's the way to do it: $("clickedElement").click(function(){ this.parent("#idOfWantedParent").doSomethingWithIt(); }); I think it should work this way, if not try to experiment with this or $(this

[jQuery] Re: how to stop jquery execution

2008-07-20 Thread ..:: sheshnjak ::..
Hi, you can envelope your for loop in an if statement to test for boolean variable that will control execution like this: var loopControl=true; for (var=startvalue;var<=endvalue;var=var+increment){ if(loopControl){ // your loop code goes here } } and now, if you set loopCo

[jQuery] Re: Ho to remove or add a new table row?

2008-07-09 Thread ..:: sheshnjak ::..
You can easily remove any row that you selected, only question is if you can select apropriate rows. $("table tr").remove(".remove"); // removes any table rows that have class="remove" or like this $("table tr").filter(":contains(unwantedText)").remove();// removes any row containing st

[jQuery] Re: Question about Event Handling Optimization

2008-06-30 Thread ..:: sheshnjak ::..
You're not loosing anything by modulizing. All event definitions will still be included in your code (if you put them all in one js file, of course). Only difference is that they are not all evaluated, just ones you need. Win-win. Only thing you will loose is half an hour to put things right. On

[jQuery] Re: Adding hover to all table rows (tr) but the first one.

2008-06-27 Thread ..:: sheshnjak ::..
> >> How can I have it not hover the last row too? > > Just to expand a little on sheshnjak's point above, if it does sound like > it's a header and footer you're trying to differentiate. If that's the case, > may I suggest the more semantic and tags? They might come in > handy. @Dean Landolt:

[jQuery] Re: Question about Event Handling Optimization

2008-06-27 Thread ..:: sheshnjak ::..
It actually does have a performance impact, even though we can't always "see it" on modern processors and javascript engines for desktop browsers. If you consider users with handheld devices that have functionality similar to PCs (and even take media="screen" instead of media="handheld" for stylin

[jQuery] Re: Adding hover to all table rows (tr) but the first one.

2008-06-26 Thread ..:: sheshnjak ::..
Hello, Karl already gave you clean solution that will surely work, but I can't resist to give you solution that might be more suitable for your needs. I presume that you don't want hover effect on the first row because it contains table header (field names for columns). If that's the fact, then yo

[jQuery] Re: Add class on click, then remove when click another, and add to that.

2008-06-26 Thread sheshnjak
Hi, I think this should work for you: - Basically, you have this in html: bla1 bla2 bla3 - To see the results put this in your css: a.clicked {background-color: red} - And finally, you should put this in js file: $("a").click(function(){ $(".targetLinkList a.clicked").removeClas

[jQuery] Re: Add class on click, then remove when click another, and add to that.

2008-06-26 Thread ..:: sheshnjak ::..
You probably have something like this in HTML: bla 1 bla 1 bla 1 Put this in css, just for testing (to see if class is set properly): a.clicked {background-color:red} Finally, in write this in your jQuery js: $(".targetLinkList a").click(function(){ // omit .targetLinkLis