Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am trying to figure out how the http://www.bitinstant.com page is made, especially how the listbox on the right is populated... and am a bit confused.
I know the listbox's name is "dest_exchange" but can't figure out where the data is coming from to populate the box.
Can you have a look and tell me where is the source URL/data please?
Dude, there's an event attached to the onchange() of select box: GetQuote();. And the function is defined in the same page:
function GetQuote() {
var $method = $('#pay_method').val();
var $amount = $('#amount').val();
var $exchange = $('#dest_exchange').val();
if ($method == "zipzap" || $method == 'fuze') {
$("#ofacbox").show();
} else {
$("#ofacbox").hide();
}
get_destaccount_tooltip($exchange);
$("#destaccount_label").html(get_destaccount_tooltip($exchange));
$("#payfromimg").attr("src","/static/images/logos/"+$method+"_carosel.png");
$("#paytoimg").attr("src","/static/images/logos/"+$exchange+"_carosel.png");
verifyMtGox();
if($amount.length==0) { return; }
Can't post the full code here, but it is from line 72 of the source of the page.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed last year.
Improve this question
The order of the numbers in my box is as follows:
function boxNumbers(){
let boxes = document.querySelectorAll('.box')
boxes.forEach((box,i)=>{
if(String(i).length==1 || (String(i).length==2 && Number(String(i)[0]))%2==0){
//box.innerHTML = `${100-i}, i=${i}`
box.innerHTML = 100-i
}
else{
box.innerHTML = String(Number(`${9-Number(String(i)[0])}${String(i)[1]}`)+ 1)
}
})
}
how can I change it to look like this:
The way the pawns are moving, I think probably your board is not setup properly?
Shouldn't it be something like this:
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Can I access these values to implement my own custom reset function since I cannot use the standard reset functionality, or do I have to create hidden field to stores these values myself, or can I store the initial data in the client memory somehow as the page is loaded that can then be used by custom reset function.
Update
I have it working for text fields but it doesnt worked for checked values, what am i doing wrong
function resetOptions(divName) {
var inputs = document.getElementById(divName).getElementsByTagName('input');
for (i = 0; i < inputs.length; i++) {
if(inputs[i].type=='checkbox')
{
if(inputs[i].defaultChecked==true)
{
inputs[i].setAttribute('checked', 'checked');
}
else
{
inputs[i].removeAttribute('checked');
}
}
else
{
inputs[i].value=inputs[i].defaultValue;
}
}
}
You are looking for the properties defaultValue and defaultChecked.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Well, the title of question look like easy, and the solution is:
$('.weatherCity').each(function () {
if ($(this).text() == 'LONDON') {
$(this).text('London Weather');
}
});
but I working on Yahoo! Weather Plugin and want to change city name, it's not iframe and we allow to change style and etc.. but look like it won't let change any text in this plugin. I thought browser read my code then yahoo get the weathers then I used promise().done() but nothing changed.
jsFiddle
Thanks in advance
-jiff
As a work around for this problem, you can use like this,
var interval = setInterval(function() {
if ($('.weatherCity').length) {
$('.weatherCity').each(function() {
if ($(this).text().trim() == 'London') {
$(this).text('London Weather');
}
});
clearInterval(interval);
}
}, 100);
Fiddle
Constantly checks for the element using setInterval and stop checking once it is found.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I need to find an element that's text value is 0.
I do:
var d = $('.content').find('div');
if(d.text().length === 0){
//do something
}
Is there a way to put the above logic in the selector?
I've tried:
var d = $('.content').find('div:empty');
But no luck as the div may have other empty html tags in.
Use a filter
var elems = $('.content').find('div').filter(function() { return $(this).text() == 0 });
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I need some help. See if you can help me out.
I have a function whose form is:
$this.find(settings.selector).each(function(index) {
Anyway, depending on a variable can change the selector as follows:
$this.each(function(index) {
Can you give me some idea how to do it? I hope I have explained roughly.
Thank you.
You can use a temp variable like
var $els;
if (some_condition) {
$els = $this.find(settings.selector)
} else {
$els = $this;
}
$els.each(function (index) {});