Not changing the chat message bubble color after applying the new color CSS class using jquery - smooch

I am changing the chat bubble color using the css class with jquery. its working fine when its loaded at the first time. but when we are sending new message this new CSS class is not applying on that.
We play around it and found that if we applied the new CSS class on message:send event then it will work. so i did that. but its not working on first message send.
When we are sending 2nd message then the first one is updating.
I am using the following codes in the init and message:send event.
$('#sk-holder #sk-container #sk-conversation .sk-row.sk-right-row .sk-msg').addClass('newClass');
I am doing it for web only.

You can now change the bubble color directly from your account settings at https://app.smooch.io under Web. This new feature is supported since 2.2.3 and is available on the CDN.

Related

how to add fading and transitions when adding the innerText of a div in javascript

just like in the "phone" app of an android phone I want that each input should have a transition and some fading effects. This is because am trying to duplicate that kind of app using JS
try looking at this photo to see the project and what I need

How to detect that a TVML lockup loses focus?

Is there a way to detect that a lockup loses focus when using TVML and TVMLKit JS on tvOS 12?
I know there's a highlight event when something receives focus using the following:
lockupElement.addEventListener("highlight", this.handleHighlight);
I want to handle when the lockup is no longer highlighted. The closest I've found to a solution is to add highlight-events to absolutely every other element and then reset any previously highlighted elements. This seems like a hack and it is also tedious and bug-prone adding it to every other element.
Anyone know of a better method?
If your lockup element is a custom element created through the extended interface creator you can override the didUpdateFocus(context, coordinator) function in your Swift class.
If it's just a default lockup I think you're out of luck.

how to set style to the button from code behind through observable collection in windows phone 8

I am facing a problem, I have an observable collection which is hiding/showing the button and changing the text as well according to situation. Everything is working fine.
But now I want to change the background color and foreground color of the button from the code behind at runtime OR I want to set the Style from the code behind. Is it possible or if possible then how?
I tried to create a Style Property in my observable collection and tried to set, but it didn't work, please help me what and where I am going wrong ?
style from code behind can be set easily like this
Note: I am supposing that the style is being created in page resources.
btn.Style = (Style)this.Resources["Style Name"];

"active" class is not applied to elements using javascript: in the href in jQTouch

For some background, I've built a mobile Android app using PhoneGap for native functionality and jQuery with jQTouch as the UI framework. I have an a bunch of links (categories) in a <ul> which open the camera. The app "knows" which link was tapped so it knows which category the picture belongs to.
The issue I'm seeing is the .active class isn't applied to elements in jQTouch deemed to have an external link, of which javascript: is one. Does anyone have an idea on how to give the user some sort of indication which <li> he tapped before the camera opens so that he can cancel his action if he notices the .active class gets applied to an element that is different from what he expected?
For the sake of posterity, it seemed to be that jQTouch was adding and removing the .active class so fast that the UI wasn't able to keep up. Basically, it was added/removed so fast that no changes were detectable at all. It worked on a computer but not on the phone.
In order to remedy this, I used a setTimeout() function on the class removal functionality. I set it to 500 milliseconds. The list item now becomes active, fires the camera functionality (or any function you choose), and then removes the class 500 milliseconds later. Perfect!

Dynamic html onClick

So I am playing around with the HTML service of GAS.
It has been working fine (more or less). But I hit a wall now.
I want the script (inside the html file) to create some html on when called.
In particular a few tags.
However, I want those tags to have onClick handlers (which will edit the div element).
Now the problem is that the onClick should depend on certain properties and I can not
pre-create those objects, they have to be made pragmatically and for some reason when I add a
onClick="someFunction(elementID)" after the new code has been added to the old one the click handler disappears.
(it works tho if the handler function has no parameters)
eg.
var div="<div id=\"box"+count+"\" class=\"square\" insert></div>";
if(something)
div=div.replace("insert", "onclick=\"myFunction(box"+count+"\"");
This is intentional and documented: see the section called "Dynamically adding scripts or external CSS" in the HtmlService user guide.