I am an android developer,trying to get started with web development. I have a filter
which works in ajax-ish
and displays the result. Please bear with me as I am a complete beginner.
Here is the code:-
<?php foreach (array_keys($statuses) as $key): ?>
<?php
$status_name = $key;
$status_data = $statuses[$key];
?>
<button class="btn btn-<?php echo $status_data['id'] ?> " data-list-facet="js-promise-status" data-facet-value="<?php echo $status_name ?>" data-select-single="true" style="background-color: <?php echo $status_data['color_bright'] ?>; border-color: #333;">
<i class="fa fa-<?php echo $status_data['icon'] ?> fa-fw" aria-hidden="true"></i>
<span> <?php echo $status_name ?></span>
</button>
<?php endforeach; ?>
My problem is: How are the data-facet-value
,data-list-value
and data-select-single
working to fetch the results?
<button class="btn btn-<?php echo $status_data['id'] ?> " data-list-facet="js-promise-status" data-facet-value="<?php echo $status_name ?>" data-select-single="true" style="background-color: <?php echo $status_data['color_bright'] ?>; border-color: #333;">
Note:- If it is unclear,just make a comment and I will complete it.