Page 3 of 9

Custom Icons in the Nav Menu

Posted: Tue Sep 25, 2012 1:58 am
by Mike4997955

I switched back to the default icon, and it works fine. Thanks Barbra!


Custom Icons in the Nav Menu

Posted: Tue Sep 25, 2012 2:16 am
by Mike4997955

So now i need to add an icon image that I already is saved in TIggzi. The only thing i change is the url which should point to the file i saved in Tiggzi. It didn't work. Can you tell me what i did wrong with this code?:

background: url(Tiggzi.getImagePath('social_google.png'));


Custom Icons in the Nav Menu

Posted: Tue Sep 25, 2012 2:24 am
by Barbara

Found this in another post

$('div[dsid="mobilecontainer1"]').css('background-image', 'url("'+Tiggzi.getImagePath('image.jpg')+'")') ;


Custom Icons in the Nav Menu

Posted: Tue Sep 25, 2012 2:46 am
by Mike4997955

OK. So i updated it to this:
background: url("'+Tiggzi.getImagePath('social_google.png')+'");

It shows a shadow where the icon should be, but still no image from the file. It works fine if i type in an external url, but i need to use the file in Tiggzi.


Custom Icons in the Nav Menu

Posted: Tue Sep 25, 2012 3:26 am
by maxkatz

Check in the generated source that the correct URL was set.

Try if this works:
background: url(Tiggzi.getImagePath('social_google.png'));


Custom Icons in the Nav Menu

Posted: Tue Sep 25, 2012 4:56 am
by Mike4997955

That was what i started with, it doesn't work. How can i check the generated source code?


Custom Icons in the Nav Menu

Posted: Tue Sep 25, 2012 11:54 am
by Maryna Brodina

Hello! Please try to run next custom JS on screen Load:

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


Custom Icons in the Nav Menu

Posted: Tue Sep 25, 2012 3:08 pm
by Mike4997955

When i try that, nothing happens. With the other code, the star icon was removed, and there was a space for a new icon. Let me do some debugging with the other code and see what i get.


Custom Icons in the Nav Menu

Posted: Tue Sep 25, 2012 3:24 pm
by Mike4997955

So, Tiggzi.getImagePath('social_google.png') returns this:

http://project.tiggzi.com/views/8d545...

The URL gets the correct image. So the problem is with the url function, with getting the url. Not sure why it isn't working

background: url("'+Tiggzi.getImagePath('social_google.png')+'");


Custom Icons in the Nav Menu

Posted: Tue Sep 25, 2012 3:44 pm
by Mike4997955

So, i got it working by using the direct tiggzi URL:

background: url("http://project.tiggzi.com/views/8d545...");

Looks like a good solution.