views:

87

answers:

0

Hi , I am currently using jquery chain to bind html controls with JSON output. I have a few elements in my that I have to bind events on. Since these elements come within the scope of the the JQuery's root I observer that none of these bindings were working , then I figured out the builder in the hash that jquery chain takes in as a parameter things worked fine until I had to use a jquery date picker within the same dom . The events are intermittently getting handled . Was wondering if there was any alternative to what I am doing ? or is there anything wrong with this approach

the code snippet looks like as shown below

fraction of the html snippet looks like

<div class="details">
 <input type="text" class="business_Street" />
 <input type="text" id="datepicker" class="birthday" />
</div> 

and the fraction of the javascript looks like

$('.details').item(jsonData).chain(
{
 '.business_Street': '{BusinessAddresses[0].Street}',
 builder : function(){
            $("#datepicker").datepicker({
               'buttonImage': '../../Content/images/icon_share.jpg',
                buttonImageOnly: true,
               changeMonth: true,
               changeYear: true,
               maxDate: '+0',
               dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
               showOn: 'both',
               dateFormat: 'dd/mm/yy'

            });
           };
         }

Any help would be appreciated

Thanks Abu