[jQuery] Re: attr feature
Maybe showing an example of what isn't working would help others help you On Feb 9, 10:28 am, Tom Shafer tom.sha...@gmail.com wrote: Does the attr feature let me capture my own attribute inside a element. I am trying and it doesnt seem to be working. I just wondering if there was a way to do this. Thanks -Tom
[jQuery] Re: attr feature
sorry about that $('#projectid').attr('link') this is going into ajax post On Feb 9, 10:59 am, MorningZ morni...@gmail.com wrote: Maybe showing an example of what isn't working would help others help you On Feb 9, 10:28 am, Tom Shafer tom.sha...@gmail.com wrote: Does the attr feature let me capture my own attribute inside a element. I am trying and it doesnt seem to be working. I just wondering if there was a way to do this. Thanks -Tom
[jQuery] Re: attr feature
I don't think it works. You might consider using the Metadata plugin: http://plugins.jquery.com/project/metadata or jQuery's jQuery.data: http://docs.jquery.com/Core/data to achieve what you want to do in a similar way. On Feb 9, 6:05 am, Tom Shafer tom.sha...@gmail.com wrote: sorry about that $('#projectid').attr('link') this is going into ajax post On Feb 9, 10:59 am, MorningZ morni...@gmail.com wrote: Maybe showing an example of what isn't working would help others help you On Feb 9, 10:28 am, Tom Shafer tom.sha...@gmail.com wrote: Does the attr feature let me capture my own attribute inside a element. I am trying and it doesnt seem to be working. I just wondering if there was a way to do this. Thanks -Tom
[jQuery] Re: attr feature
This works fine for me (using jQuery 1.3): $(function(){ $('div').attr('id','test').html('div html').appendTo ('body'); // inject html element, also works fine hard-coded. $('#test').attr('ryantest','hithere'); $('a').click(function(event){ event.preventDefault(); alert($('#test').attr('ryantest')); }); }); Alerts 'hithere' when you click a link. On Feb 9, 10:28 am, Tom Shafer tom.sha...@gmail.com wrote: Does the attr feature let me capture my own attribute inside a element. I am trying and it doesnt seem to be working. I just wondering if there was a way to do this. Thanks -Tom