mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-02 15:25:26 +00:00
add alt attributes to images
fixes https://github.com/bigskysoftware/htmx/issues/742
This commit is contained in:
parent
e98d817805
commit
53f174d5a4
@ -9,7 +9,7 @@ state that looks like this:
|
||||
|
||||
```html
|
||||
<div hx-get="/graph" hx-trigger="load">
|
||||
<img class="htmx-indicator" width="150" src="/img/bars.svg"/>
|
||||
<img alt="Result loading..." class="htmx-indicator" width="150" src="/img/bars.svg"/>
|
||||
</div>
|
||||
```
|
||||
|
||||
@ -49,13 +49,13 @@ img {
|
||||
});
|
||||
|
||||
onGet("/graph", function(request, params){
|
||||
return "<img src='/img/tokyo.png'>";
|
||||
return "<img alt="Tokyo Climate" src='/img/tokyo.png'>";
|
||||
});
|
||||
|
||||
// templates
|
||||
function lazyTemplate(page) {
|
||||
return `<div hx-get="/graph" hx-trigger="load">
|
||||
<img class="htmx-indicator" width="120" src="/img/bars.svg"/>
|
||||
<img alt="Result loading..." class="htmx-indicator" width="150" src="/img/bars.svg"/>
|
||||
</div>`;
|
||||
}
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user