Page 3 of 3

xcode custom icons and photoswipe image not loading

Posted: Tue Oct 01, 2013 4:00 am
by Illya Stepanov

Where do you place this code?

You now have only one selector -- "nav_contact".


xcode custom icons and photoswipe image not loading

Posted: Tue Oct 01, 2013 11:05 am
by Jen5411892

I added this JS to page load:

$('a[dsid="nav_contact"]').css('background-image', 'url("'+Tiggzi.getImagePath('75-phone.png')+'")') ;

And this is my CSS:
[dsid=nav_contact] .ui-icon {
background: url("../../www/project/files/views/assets/image/75-phone.png");
background-repeat: no-repeat;
background-size: 24px 24px;
height: 24px !important;
margin-left: -10px !important;
width: 24px !important;
}


xcode custom icons and photoswipe image not loading

Posted: Tue Oct 01, 2013 2:21 pm
by Kateryna Grynko

Hi Jennifer,

Everywhere, including your CSS code you should replace:

codehttp://appery.io/app/view/209b4ce6-485f-4129-8149-c43022e73c6b/code
with
code../../www/project/codeas I advised above.


xcode custom icons and photoswipe image not loading

Posted: Tue Oct 01, 2013 2:24 pm
by Kateryna Grynko

Also, please note that onLoad event rewrites the style after you set it in CSS so you should choose between them and use an only option to set styles.

This is correct:
codebackground-repeat: no-repeat;/code


xcode custom icons and photoswipe image not loading

Posted: Tue Oct 01, 2013 3:50 pm
by Jen5411892

Yes, I realize that. I'm just trying to get one icon to work first.


xcode custom icons and photoswipe image not loading

Posted: Tue Oct 01, 2013 3:53 pm
by Jen5411892

Can you please log in and take a look? I've been going round and round on this for a while with no answer. The only way I can get the icon to load is to use the JS on page load. However, the icon is repeating. What can I add to the JS to get it to stop repeating?

JS on page load:
$('a[dsid="nav_contact"]').css('background-image', 'url("'+Tiggzi.getImagePath('75-phone.png')+'")') ;


xcode custom icons and photoswipe image not loading

Posted: Tue Oct 01, 2013 3:54 pm
by Jen5411892

The CSS does not work for me.

this is what I'm using:
[dsid=nav_contact] .ui-icon {
background: url("../../www/project/files/views/assets/image/75-phone.png");
background-repeat: no-repeat;
background-size: 24px 24px;
height: 24px !important;
margin-left: -10px !important;
width: 24px !important;
}

The image doesn't load in the builder or on a real device. I've tried.


xcode custom icons and photoswipe image not loading

Posted: Wed Oct 02, 2013 11:05 am
by Kateryna Grynko

Hi Jennifer,

To make the icons work in xCode you should change styles to:
codebackground: url("../image/Home-icon.png");/codeetc.

Then delete adding the image on Page Load event please.