how to retrieve img alt text with jquery or javascript? [on hold]
- by kate
Which is the code with which we can retreive alternative text of image:
It is a Cataloge with clothes. Dressers, Shirts, Skirts e.t.c. in front page of a site. The featured images of the categories can be changed manually from someone.
I did a check and it is asking me to give alt text. I did it to some images with alt="". But to the cataloge I cannot do it.
the code is below:
{{ 'option_selection.js' | shopify_asset_url | script_tag }}
{{ 'api.jquery.js' | shopify_asset_url | script_tag }}
{% if template contains 'customers' %}
{{ 'shopify_common.js' | shopify_asset_url | script_tag }}
{{ 'customer_area.js' | shopify_asset_url | script_tag }}
{% endif %}
{% if settings.display_slideshow %}{{ 'jquery.slider.js' | asset_url | script_tag }}{% endif %}
{% if settings.include_masonry %}{{ 'jquery.masonry.js' | asset_url | script_tag }}{% endif %}
{% if settings.enable_product_image_zoom %}{{ 'jquery.zoom.js' | asset_url | script_tag }}{% endif %}
{{ 'fancy.js' | asset_url | script_tag }}
{{ 'shop.js' | asset_url | script_tag }}
Shopify.money_format = '{{ shop.money_format }}';
{% if template contains "product" %}
jQuery(document).ready(function($){
{% if product.variants.size 1 or product.options.size 1 %}
new Shopify.OptionSelectors("product-select", { product: {{ product | json }}, onVariantSelected: selectCallback });
{% assign found_one_in_stock = false %}
{% for variant in product.variants %}
{% if variant.available and found_one_in_stock == false %}
{% assign found_one_in_stock = true %}
{% for option in product.options %}
$('#product-select-option-' + {{ forloop.index0 }}).val({{ variant.options[forloop.index0] | json }}).trigger('change');
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
});
$(function() {
$( "#tabs" ).tabs();
});