[jQuery] animate() for background-image and/or classnames?
Hi there! Is there any chance to use animate() to animate a background-image and/ or classnames? $(#block).animate({ backgroundImage: 'url(bla.gif)' }, 1500 ); Doesn't seem to work. :( Let's say I have an element with a red background and the class 'red', I want to remove the class 'red' and add the class 'blue' so that the element get's blue.
[jQuery] 1.2 out?
I just grabbed http://jquery.com/src/jquery-latest.js and the header of the file says: /* * jQuery 1.2 - New Wave Javascript * * Copyright (c) 2007 John Resig (jquery.com) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * $Date: 2007-09-10 15:45:49 -0400 (Mon, 10 Sep 2007) $ * $Rev: 3219 $ */ Is 1.2 officially out? YEAH! :-)
[jQuery] Re: textareas and contains()
$('#myTextarea').attr('val').indexOf('hello') != -1 --Klaus $('#myTextarea').val().indexOf('hello') != -1 works. Thanks! :) Now, when I extend my code it doesn't work anymore. if ($('#myTextarea').val().indexOf('hello') != -1) { log.empty().html('test'); } else if ($('#myTextarea').val().indexOf('moo') != -1) { log.empty().html('test2'); } typing in 'moo' works, the log layer get's filled with 'test2'. typing in 'moo hello' also works, the log layer get's filled with 'test'. typing in 'moo hello moo' should produce 'test2' but it just does nothing. :(
[jQuery] Re: textareas and contains()
What I was trying to do here was to make a mootools example in jQuery. In mootools, all you need is: if(txt.val().contains('hello')) txt.trigger('burn', 'hello world!'); Therefore I was looking for a jQuery way to do it but contains() doesn't work as expected. :( On Aug 27, 3:39 pm, Klaus Hartl [EMAIL PROTECTED] wrote: MrNase wrote: $('#myTextarea').attr('val').indexOf('hello') != -1 --Klaus $('#myTextarea').val().indexOf('hello') != -1 works. Thanks! :) Now, when I extend my code it doesn't work anymore. if ($('#myTextarea').val().indexOf('hello') != -1) { log.empty().html('test'); } else if ($('#myTextarea').val().indexOf('moo') != -1) { log.empty().html('test2'); } typing in 'moo' works, the log layer get's filled with 'test2'. typing in 'moo hello' also works, the log layer get's filled with 'test'. typing in 'moo hello moo' should produce 'test2' but it just does nothing. :( That is correct. indexOf works by exact matching, thus moo hello moo may not match and nothing gets logged, both the if and the else condition are false. You may have to use regular expressions for a bit more flexibility. --Klaus
[jQuery] functions not working on ajax generated content
Hello! I have one very annoying problem. First of all, I have a list of items. Each items contains information that I want to display on the webpage using several functions. Here's an example: function getNumbers() { var numberofentries = $('#kilometer-data li').size(); } Everything works when I have a static list that is generated by PHP everytime I load the page but I want to use Ajax to load the list. The problem is that the functions don't work. :( I have the function called init() where I use Ajax.get to fetch the list and I have several other functions but writing them down like: $(document).ready(function() { init(); otherfunction(); // booth need the data provided by init(); function(); }); doesn't work. otherfunction() and function() are unable to work with the data generated by init() I really hope you understood my problem. ;-) Thanks, Dominik
[jQuery] Re: blur( fn ) doesn't work in Opera?
I even tried $(#inputthreadtitle).bind(blur, function(){ // }); but that also doesn't work. :-(
[jQuery] Re: blur() problem
It's not a jQuery problem. Try using a { outline: 0; } in your CSS file. :)
[jQuery] blur( fn ) doesn't work in Opera?
I am using this code: $(document).ready(function() { $('#inputthreadtitle').blur(function() { var value = this.value; $('td#similarthreadcheckcontent').html('img src=images/misc/ 13x13progress.gif /'); $.get(ajax.php, { do: 'getsimilarthreads', title: value }, function(data){ $('td#similarthreadcheckcontent').html(data); } ); }); }); with the latest release of jQuery but Opera doesn't react on the onBlur event. When I write something to the input field and then click somewhere, Opera just does nothing. :-(
[jQuery] Re: :contains - a bit more specific?
Thanks Erik, it works great! :) $('div.commentfooter span').filter(function() { return $(this).html() == 'test'; }).append('class'); ---dominik
[jQuery] :contains - a bit more specific?
I have some layers, each of this layers has a span tag with a username. Now, I want to append some code to each layer that has a span which contains 'test'. The code I tried is: $(div.commentfooter[span:contains('test')]).append('class'); But that also appends 'class' to layers that have a span tag containing 'testman' or 'tester'. What do I need to change to only select those layers that have a span tag that contains the word 'test' and only this word? $(div.commentfooter[span:is('test')]).append('class'); doesn't work. :-( ---dominik
[jQuery] Widgetbox variables, problems with $()
I just released a Farbtastic Widget on Widgetbox.com During the creation of the Widget, the website allows you to specify parameters. They all look like: var userlanguage = ${config.userlanguage}; Here is the problem: Because of the $, jQuery doesn't work anymore. Is there a way to fix it? Their help says: These parameters are passed via the query string: http://yourwidget.com?param=value How (besides $()) can I access the parameters? (The Url to the widget is: http://www.widgetbox.com/widget/farbtastic-widget )
[jQuery] Re: Widgetbox variables, problems with $()
var $j = jQuery; wow thank you! ---dominik
[jQuery] Re: Widgetbox variables, problems with $()
As I see now, the problem still exists. jQuery doesn't know what to do with - var userlanguage = ${config.userlanguage}; I would need to tell jQuery that ${config.userlanguage} has nothing to do with jQuery. :-( ---dominik On 30 Mai, 23:08, MrNase [EMAIL PROTECTED] wrote: var $j = jQuery; wow thank you! ---dominik
[jQuery] Re: jquery.tabs - is it possible?
Klaus, thanks for your reply. :-) I don't get it to work so I'll write my own small plugin. :-( ---dominik
[jQuery] random list item
I have a list with numerous list items and 'onclick' I want to have one randomly selected item. How can I do this the jQuery way? dominik