Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
179 views
in Q2A Core by

Hi Question2Answer Team...

I have a QnA website, in which I'm using both Hindi and English in question title. Because of that, my question title become very long, that's showing awkward in mobile. I just want to make shorter by three dots (...). Means,

I want only show Hindi word of title, and English word partially hidden by three dots. When Users want to see full title, they can see by clicking three dots.

for example-

Shorter Title (What I Want)

You can see clearly three dots (...) after question mark (?)

Below long URL is Showing By Default in my site

I just want, when users click on last three dots (...) after question mark (?), Than full title will show, otherwise English title will hidden.

Please help.

Q2A version: 1.8.5
by
moved by
+1
Isn't it easier to make a separate page in Hindi and a separate one in English? In my opinion, this will be the best solution.
by
+1
Depends on if you're using Javascript or plain HTML for the click.

In plain html, the HREF part is hidden, so can be as long or as short as you want it to be

<a class='yourcssclass' href='https:thisisaverylongurlformynewsite.com?parameters=anythingyoulike'>link</a>

As to a hindi-text becoming longer on click or mouseover, there you will have to use Js, and more likely an Ajax-call looking for the longer title and putting it in place, or do a seek/hide game (short title visible, longuer title hidden, and than switch visibility)
You can also use JS (hover) with CSS, as many tooltips do

There are tons of scripts for that
https://www.codegrepper.com/code-examples/html/tooltip+php

1 Answer

+1 vote
by

Isn't it easier to make a separate page in Hindi and a separate one in English? In my opinion, this will be the best solution.

by
+1
Ok...Than, the other option is to short the length of the question title is "hide words by three dots (...) after 100 character.
Means, Let assume Question Title length is 200 character. but, I want to show only 100 character and rest 100 character of title is partially hidden by three dots.
when users click on three dots than full length of title should show.
Can you please tell us how to do so?
...