Yea, that happens if you don't follow the standard some browser
will break your code :)
For a comprehensive overview of propper HTML nesting rules, consult my
diagram:
http://vidasp.net/HTMLstructure.htm
Thanks for your replies!
FF is happy now, although it's not fully standards-compliant (I still
have an img inside my label), but the code is a lot cleaner and it
works on the major browsers (haven't tested IE though :D)
Nice diagram!
Thomas
ah look at that, img is an inline element :D
standards ftw!
On 24 dec, 23:10, turnavies thomas.vanoeke...@gmail.com wrote:
Thanks for your replies!
FF is happy now, although it's not fully standards-compliant (I still
have an img inside my label), but the code is a lot cleaner and it
works on
Suppose your rows looked like this:
tr id=row_1tdtext/td/tr
tr id=row_2tdtext/td/tr
tr id=row_3tdtext/td/tr
$(tr).click(function () {
$(.clicked).removeClass(clicked);
$(this).addClass(clicked);
var row_id = this.id.split('_')[1]; // e.g. 2
$(#hiddenField).val(row_id); //
Works like a charm! Thanks so much! :)
Works like a charm! Thanks so much! :)
Works like a charm! Thanks so much! :)
Hi,
I think that is because of the alert function.
It needs a string and maybe for an anchor object, jquery introduces a
toString method.
With the console of firebug, there are no differences between anchor and
images
Pierre
2009/6/11 bensan...@gmail.com bensan...@gmail.com
Hi all,
I'm
Hi Bensanlau,
try
$('a').click(function(){
alert(*$(this)*);
return false;
});
Chandan Luthra
Intelligrape Software Pvt. Ltd.
Josh Billingshttp://www.brainyquote.com/quotes/authors/j/josh_billings.html
- Every man has his follies - and often they are the most interesting
thing he has got.
On
Just clearing up what Pierre said: if the argument you passed to alert
() is not a string, it's .toString() method will be called. For
convenience, the toString on an anchor HTMLElement object returns it's
href. Try this:
$('a').get(0).toString();
or
$('a').click(function(){
alert(
Interesting! That's also the same with labeling object properties. The
label will be casted into their string representation.
a href=hi.html id=yaasdf/a
$('#ya').click(function(){
a = {};
a[this] = 1;
cache = this;
});
alert(a[cache.toString()]); // alerts 1
On Jun 11, 12:16 pm,
I think you want this:
if($(#content).hasClass(blue)) {
$(#content).removeClass(blue);
$(#content).addClass(red);
}
if($(#content).hasClass(red)) {
Thanks
On Sun, Mar 29, 2009 at 1:25 AM, Ricardo ricardob...@gmail.com wrote:
That's as simple as changing $(.ajax_homes_primary_img).click
(function(){ to $(.ajax_homes_primary_img).live('click', function()
Thanks, tried it, and even used livequery (amazing how fast this stuff
is to pick
Your click handler only applies to the elements matching
.ajax_homes_primary_img at the time the click() function is called.
When you replace it, the new element has no event listeners attached.
You can either rebind the event every time you modify it, or use the
'live' function, which uses event
That's because events are binded to existing elements.
If you're using 1.3.x, take a look at live method:
http://docs.jquery.com/Events/live#typefn. With previous versions,
livequery plugin may be helpful: http://docs.jquery.com/Plugins/livequery
On 11 мар, 09:25, sure sure.2...@gmail.com
Hi errant,
Thank you very much for quick reply. Now it works good using
live method. Your solution saves my lot of time.
with Regards
sure.
On Mar 11, 1:32 pm, errant d.cheka...@gmail.com wrote:
That's because events are binded to existing elements.
If you're using 1.3.x, take a
You can place transparent div on top of iframe
I am not exactly sure what you are doing with the positioning, but
try .toggle() instead perhaps?
Cheers
On Dec 15, 11:13 am, Alfredo Alessandrini alfreal...@gmail.com
wrote:
I've a simple question..
I'm writing a function that call an event on first mouse click and
call another event on
Here's exactly the function that you need.
http://docs.jquery.com/Events/toggle#fnfn2fn3.2Cfn4.2C...
On Dec 15, 8:56 am, theCrandallSter thecrandalls...@gmail.com wrote:
I am not exactly sure what you are doing with the positioning, but
try .toggle() instead perhaps?
Cheers
On Dec 15,
That's because the element did not exist when you assigned the click
handler. Have a look at the liveQuery plugin [1] or otherwise make
sure that any newly-created elements are given notice of how the're
supposed to act when you introduce them to the document.
[1]
That's because the element did not exist when you assigned the click
handler. Have a look at the liveQuery plugin [1] or otherwise make
sure that any newly-created elements are given notice of how the're
supposed to act when you introduce them to the document.
Hi,
Thanx for the tip ;) I realize now it's a common problem with jquery.
You talked about LiveQuery. According to you, what is the main
difference with the quite new plugin LiveBind ?
otherwise make
sure that any newly-created elements are given notice of how the're
supposed to act when
You don't need .val() just: $(this).attr(alt)
Please write some more code, because at the moment I think it is all
right.
On 28 Sep., 17:21, SeanJA [EMAIL PROTECTED] wrote:
$(.status_actions img).click(function(){
console.log(clicked!);
console.log($(this).attr(alt).val());
For some reason though it doesn't even do the first console.log
$(.status_actions img).click(function(){
console.log(clicked!);
});
nor will it do alert or anything else...
On Sep 28, 1:42 pm, BB [EMAIL PROTECTED] wrote:
You don't need .val() just: $(this).attr(alt)
Please write
For some reason it doesnt even do the first console.log though...
On Sep 28, 1:42 pm, BB [EMAIL PROTECTED] wrote:
You don't need .val() just: $(this).attr(alt)
Please write some more code, because at the moment I think it is all
right.
On 28 Sep., 17:21, SeanJA [EMAIL PROTECTED] wrote:
I bet the length of the object being returned is 0. Is your selector
right?
If you could post a test page it would be much easier for someone to
help!
- ricardo
On Sep 28, 5:30 pm, SeanJA [EMAIL PROTECTED] wrote:
For some reason it doesnt even do the first console.log though...
On Sep 28,
I did not fully realize the issue with the duplication of the ids from
Thomas first post... Now I understand and have a working example to
base my code on.
Thank you very much for your help Richardo and Thomas.
Your document contains multiple same ids (info, info_link). This is
not valid (http://validator.w3.org/check?verbose=1uri=http://
dev.dreimorgen.com/test.html). Please correct this first (use classes
instead) and try again.
For me this is working.
Thomas
Thanks for the hint Thomas.
I revised the code so that it validates correctly now. And I stripped
it down to a minimalist version to show my point.
Click item 1
- toggle link appears
click on toggle link (IE6/IE7 do not toggle the content whereas Safari
FF do on the first time)
Click item 1
When you copy the content with jQuery('#content').html(content);
you're still duplicating the #item1_content_info ID, that's the source
of your problems.
I took the liberty to duplicate your page and alter the script
(working in IE):
http://ff6600.org/j/toggle.htm
or for a more semantic
Might be worth looking into the livequery plugin too
J
On Jun 6, 1:43 am, Richard D. Worth [EMAIL PROTECTED] wrote:
Take a look at:
http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
If I've understood you're problem, it's a fairly common one that stems from
the fact
That article in the FAQ does mention LiveQuery.
--
Ariel Flesler
http://flesler.blogspot.com
On 6 jun, 05:56, Jon Reed [EMAIL PROTECTED] wrote:
Might be worth looking into the livequery plugin too
J
On Jun 6, 1:43 am, Richard D. Worth [EMAIL PROTECTED] wrote:
Take a look at:
Take a look at:
http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F
If I've understood you're problem, it's a fairly common one that stems from
the fact that you're adding a new element (with append('li ...) that has
no click event bound to
elle,
Since you're going to have 8 fieldsets, why don't you have some code
that will automatically close all of them when the change function is
called, then you can use a variable as your jQuery selector so you
don't have to use an IF statement. You could do something like this.
@Dave: when I selected the first product it showed me its options.
Changing an option didn't do a thing.
Clicking again on first product, hid its options.
@motob: I used this instead:
$(.product-type).change(function(){
if($(this).val() == filters){
$('#orderform').find('.options').hide();
$('.product-type').find('option.producta').click(function(select) {
$('fieldset.producta').slideDown(slow);
});
$('.product-type').find('option.productb').click(function(select) {
Instead of adding click listeners to the option elements, add a change
listener to the overall select menu. Once the change event is fired,
determine which value is choosen, then show/hide the appropriate
option fieldset. NOTE: You may want to change the values of the option
elements so that they
37 matches
Mail list logo