- Posts: 39
COMMUNITY FORUM
K2 Item Title Spaces
- andrea
- Topic Author
- Offline
- Junior Member
Less
More
11 years 2 months ago #116145
by andrea
K2 Item Title Spaces was created by andrea
hi guys, i try to make a different color the first word of the itemTitle (item.php) with this jquery code:
Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
- Offline
- Platinum Member
- Aham Brahmasmi
11 years 2 months ago #116146
by Kannan Naidu Venugopal
K2 Rocks \m/
Replied by Kannan Naidu Venugopal on topic Re: K2 Item Title Spaces
You can try this code here, see if it helps - blog.codez.in/jquery-css-styling-first-word-of-a-text-differently/jquery/2010/08/23
K2 Rocks \m/
Please Log in or Create an account to join the conversation.
- andrea
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 39
11 years 2 months ago #116147
by andrea
Replied by andrea on topic Re: K2 Item Title Spaces
i've tryed too this solution but always the same problem with space :\
Please Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
- Offline
- Platinum Member
- Aham Brahmasmi
11 years 2 months ago #116148
by Kannan Naidu Venugopal
K2 Rocks \m/
Replied by Kannan Naidu Venugopal on topic Re: K2 Item Title Spaces
is there any css value that is messing the spacing ? like word-spacing or letter-spacing. Can share the link to your site ?
K2 Rocks \m/
Please Log in or Create an account to join the conversation.
- andrea
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 39
11 years 2 months ago #116149
by andrea
Replied by andrea on topic Re: K2 Item Title Spaces
i have in local, i put the code html and css
HTML becomes:
HTML becomes:
Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
- Offline
- Platinum Member
- Aham Brahmasmi
11 years 2 months ago #116150
by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: K2 Item Title Spaces
You mentioned that you want to change the first word to a different color, but this code sets the background and font color of the entire h2.
Why are you using <strong></strong> ?
You should be using something like <span></span> for the js
Your html output should be
Why are you using <strong></strong> ?
You should be using something like <span></span> for the js
Your html output should be
K2 Rocks \m/
Please Log in or Create an account to join the conversation.
- andrea
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 39
11 years 2 months ago #116151
by andrea
Replied by andrea on topic Re: K2 Item Title Spaces
I've used <strong> for test.
The problem there isn't strong, span or other, the problem is the k2 make a space and the js code don't work and the output is:
The problem there isn't strong, span or other, the problem is the k2 make a space and the js code don't work and the output is:
Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
- Offline
- Platinum Member
- Aham Brahmasmi
11 years 2 months ago #116152
by Kannan Naidu Venugopal
K2 Rocks \m/
Replied by Kannan Naidu Venugopal on topic Re: K2 Item Title Spaces
Have you tried by just using <h2> only or try <h2 class="mytitle"> ?
K2 Rocks \m/
Please Log in or Create an account to join the conversation.
- andrea
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 39
11 years 2 months ago #116153
by andrea
Replied by andrea on topic Re: K2 Item Title Spaces
- Kannan Naidu Venugopal
- Offline
- Platinum Member
- Aham Brahmasmi
11 years 2 months ago #116154
by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: K2 Item Title Spaces
Here's what i did, and it worked like a charm :)
My JS
My JS
K2 Rocks \m/
Please Log in or Create an account to join the conversation.