Похожие чаты

Hi guys, how do we programmatically change css from ajax?

it is required due to pseudo thingy

26 ответов

54 просмотра

I read this from right to left and left to right still doesn't make any sense, kindly share before and after pictures

You have two questions here: * How do I use the result of AJAX calls? * How do I change CSS with JS? The answer to the second is "You can't". What you can do is add or remove <style> tags, modify .style props of elements, and change classes of elements

akh Amirul-Idzham Автор вопроса
Richard | If you DM for support you PAY
I read this from right to left and left to right s...

I don't have my resources now but what I can tell you that I need to set top position of sticky display row of table header according to its content. It's dynamic row

akh Amirul-Idzham Автор вопроса
Simen
You have two questions here: * How do I use the re...

I see... The ajax call return strings array to be output as row header that required sticky row position from top. Well as per you said, I guess as per my reading on web, there's no way for inline styling for pseudo elements. Guess I've to find another way

akh Amirul Idzham
I don't have my resources now but what I can tell ...

let me get this straight, you fetch html from a remote server and you want to apply styling to the first row (make it sticky)?

akh Amirul-Idzham Автор вопроса
Richard | If you DM for support you PAY
let me get this straight, you fetch html from a re...

Sorry but nope, I get data only from ajax to append those rows. I just need to do some calculations to set the top of sticky position

akh Amirul Idzham
I see... The ajax call return strings array to be ...

True, there is no way to directly style pseudo elements with js, but you can use css variables. Set the variable value with javascript, and use the value in the css

devFojo Olubo
True, there is no way to directly style pseudo ele...

PS: This is me assuming you're using React or it's frameworks. I don't know how to achieve this in vanilla JS or other JS frameworks

akh Amirul-Idzham Автор вопроса
akh Amirul-Idzham Автор вопроса
akh Amirul Idzham
Yeah this is Vue btw

I figured a way to do it on vanilla. It will work on Vue too

devFojo Olubo
screenshot

Similar to having a div inside a span, this works but is not the "recommended" standard way. Here is how one is supposed to do it paragraph.style.setProperty("--clr", "blue");

akh Amirul-Idzham Автор вопроса
devFojo Olubo
I figured a way to do it on vanilla. It will work ...

This is okay before scrolling and another one after scrolling, which is should not behave like that

akh Amirul-Idzham Автор вопроса
akh Amirul-Idzham Автор вопроса
devFojo Olubo
I figured a way to do it on vanilla. It will work ...

For short data like this: { position: sticky; top: 73px; } For long data like this: { position: sticky; top: 81px; }

akh Amirul-Idzham Автор вопроса
devFojo Olubo
What is this supposed to be?

Should be the image of another one. Without overlapping of other tr tag

akh Amirul Idzham
Should be the image of another one. Without overla...

Like it should stick without overlapping the top section?

akh Amirul-Idzham Автор вопроса
devFojo Olubo
Like it should stick without overlapping the top s...

Yeah. That's it. It has 2 layers that are both sticky positions

akh Amirul Idzham
Yeah. That's it. It has 2 layers that are both sti...

You'd have to calculate the exact point to set the top value to.

akh Amirul-Idzham Автор вопроса
devFojo Olubo
You'd have to calculate the exact point to set the...

Yeah I figured out so. Yesterday I did resolved the issue but with hard code. So it is temporary solution

akh Amirul Idzham
Yeah I figured out so. Yesterday I did resolved th...

Sure, hardcoding can be like that. You can make it dynamic with javascript

akh Amirul-Idzham Автор вопроса
devFojo Olubo
Sure, hardcoding can be like that. You can make it...

Yeah but the problem is as the title gets even longer, the hard code may no longer works, maybe need something like multiplication with a number or floating number may help. Still figuring out the best way

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта