Mike4997955
Posts: 0
Joined: Wed Sep 12, 2012 7:50 pm

Custom Icons in the Nav Menu

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

Mike4997955
Posts: 0
Joined: Wed Sep 12, 2012 7:50 pm

Custom Icons in the Nav Menu

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'));

Barbara
Posts: 0
Joined: Mon Sep 17, 2012 8:42 am

Custom Icons in the Nav Menu

Found this in another post

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

Mike4997955
Posts: 0
Joined: Wed Sep 12, 2012 7:50 pm

Custom Icons in the Nav Menu

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Custom Icons in the Nav Menu

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

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

Mike4997955
Posts: 0
Joined: Wed Sep 12, 2012 7:50 pm

Custom Icons in the Nav Menu

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

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

Custom Icons in the Nav Menu

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

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

Mike4997955
Posts: 0
Joined: Wed Sep 12, 2012 7:50 pm

Custom Icons in the Nav Menu

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.

Mike4997955
Posts: 0
Joined: Wed Sep 12, 2012 7:50 pm

Custom Icons in the Nav Menu

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')+'");

Mike4997955
Posts: 0
Joined: Wed Sep 12, 2012 7:50 pm

Custom Icons in the Nav Menu

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

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

Looks like a good solution.

Return to “Issues”