I am trying to run this bit of jquery in the signup template, but does not seem to work. HTML: <script type="text/javascript"> jQuery(document).ready(function() { $('input#start_date-0').text('12/25/2011'); $('input#end_date-0').text('12/26/2011'); $('input#end_date-0').css("border","1px solid red"); }); </script> just trying to auto fill 2 form fields bases off of their IDs... Any idea why this does not work?
HTML: <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready(function() { jQuery('input#start_date-0').text('12/25/2011'); jQuery('input#end_date-0').text('12/26/2011'); jQuery('input#end_date-0').css("border","1px solid red"); }); </script> What about if you try with the above?
hey! that sorta worked! the css border applied to the id end_date-0, but the text was not applied to the same element. i did notice that i am getting an error: TypeError: 'undefined' is not a function (evaluating 'jQuery("a[rel^='prettyPhoto']").prettyPhoto()') this error is from a js file for the wordpress theme that i have installed. for my amember v4 pages, i am using the option to bring in my wordpress header and footer. if i applied the noConflict to the wordpress theme files, do you think that would help me? thanks a bunch!
i just noticed that the js file that is generating the error IS running query in noConflict mode already...guess i'll keep diggin'!
it looks like the dates ARE being applied to the input elements, but they do NOT display inside...see attached screen grab
this worked! Code: jQuery('input#start_date-0').attr('value', '12/25/2011'); jQuery('input#end_date-0').attr('value', '12/26/2011'); thanks for your help graphixx!