deveu
Posts: 0
Joined: Tue Apr 08, 2014 4:10 am

Button not visible

yes

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Button not visible

Please clarify on what page and how do you run the code?

deveu
Posts: 0
Joined: Tue Apr 08, 2014 4:10 am

Button not visible

http://appery.io/app/view/1b2d4085-6b...

Login first by clicking button and that is once

and check in by this no/any aus no(start 04 and 10 digit)

0402884332

I made the button not visible unchecking visible

and I want to to make button visible with js
Pls look js in javascript/welcome
btn_reward = $('#Reward_reward_grid_' + i).find("#Reward_btn_reward");
btn_reward.show();

if you do any change
pls inform me with pic what you have changed

Matt6607699
Posts: 0
Joined: Sat Jan 25, 2014 7:18 am

Button not visible

Are you able to target that button to change anything on it when its visible as a test?

I usually just target buttons with:$('div[dsid="Reward_btn_reward"]').show();

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Button not visible

Hi Deveu,

You have set your button with attr "style" - that's incorrect. Because of setting this attr will delete all styles set before.

Please use following code instead of yours:
precode
function ProcessYourData() {
var availablepoints = parseInt(localStorage.getItem("local_available_points"));
var total_items = parseInt(localStorage.getItem("local_total_items"));
if (available_points > 0 && total_items > 0) {
for (i = 0; i < total_items; i++) {
var required_points = parseInt($('#Reward_reward_grid' + i)&#46;find("#Rewardrequired_points")&#46;val());
var btn_reward = jQuery('#Reward_reward_grid' + i)&#46;find('[name="btn_reward"]');

Code: Select all

     btn_reward&#46;show(); 

     if (available_points >= required_points) { 
         btn_reward&#46;css('background-color', '#BFD770'); 
         &#47;&#47;This row is delete all styles and append new one&#46; Use "btn_reward&#46;css" instead&#46; 
         &#47;&#47;btn_reward&#46;attr("style", "width:150px;height:50px;background-color:#BFD770;border-radius:25px !important"); 
     } else { 
         reward_more = parseInt(required_points) - parseInt(available_points); 
         reward_more = reward_more + " more check-in&quot 
         btn_reward&#46;text(reward_more); 
         btn_reward&#46;css('background-color', '#B5B4B5'); 
         &#47;&#47;This row is delete all styles and append new one&#46; Use "btn_reward&#46;css" instead&#46; 
         &#47;&#47;btn_reward&#46;attr("style", "width:150px;height:50px;background-color:#B5B4B5;border-radius:25px !important"); 

         btn_reward&#46;attr("disabled", "disabled"); 
     }; 
 } 
 localStorage&#46;setItem("local_available_points", 0); 
 localStorage&#46;setItem("local_total_items", 0); 

}/code/pre

deveu
Posts: 0
Joined: Tue Apr 08, 2014 4:10 am

Button not visible

Thanks
working

I got visible what was last tme then invisible and visible again

after visible and work done
I am doing the button invisible again
if (available_points 0 && total_items 0) {
for (i = 0; i < total_items; i++) {
btn_reward = $('#Reward_reward_grid_' + i).find("#Reward_btn_reward");
btn_reward.hide();
}
}

but now 1 more issue
taking time to be visible button
I think the problem for services data delay

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Button not visible

Hello!

Could you give us more information about your last issue and steps how to reproduce it?

deveu
Posts: 0
Joined: Tue Apr 08, 2014 4:10 am

Button not visible

in Fire Fox
that is ok

sometime I am getting problem with Chrome

any idea?

deveu
Posts: 0
Joined: Tue Apr 08, 2014 4:10 am

Button not visible

any comment about this?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Button not visible

Hello,

What problems do you have in Chrome?

Return to “Issues”