Click here to Skip to main content
16,012,508 members

Comments by Tautvydas Deržinskas (Top 9 by date)

Tautvydas Deržinskas 17-Feb-14 18:08pm View    
P.s. In this case if I will click on <div id="Payment-Selection"></div> I will get error: 'Uncaught TypeError: Cannot read property 'w' of undefined ', line: $(Popups[i]['c']).click(function() { PopupDrop(Popups[i]['w']); }); http://jsfiddle.net/s5auB/
Tautvydas Deržinskas 17-Feb-14 17:54pm View    
So lets say full code is:
<pre lang="Javascript">function PopupDrop(n) { console.log(n); }

var Popups = [
{c:'#Payment-Selection',w:'Cards-Popup'},
{c:'#Drop-SY',w:'Start-Years'}
];

function ActivatePopups() {

for (var i=0; i<Popups.length; i++) {

$(Popups[i]['c']).click(function() { PopupDrop(Popups[i]['w']); });

}

}
ActivatePopups();</pre>
It does not work for me, using newest version of jquery. Thats not the case with elements, I just need to pass second object option to function as string...
Tautvydas Deržinskas 7-May-13 19:15pm View    
Thank you Balimusi! Works fine. So to write to new file results I have to replace Console.WriteLine(s); yes?
Tautvydas Deržinskas 7-May-13 18:22pm View    
Sorry, I have updated my question.
Tautvydas Deržinskas 6-May-13 16:08pm View    
The thing is that I am not presenting number to screen, I am checking how they are typed to textBox.