How can I target every class, that ends with a 1
, 3
, 5
, 7
, or 9
? It could be 101
as well.
<tbody>
<tr>
<td class="1">
<td class="2">
<td class="3">
<tr>
<tr>
<td>...
This is ongoing, so I don't know how many, thus I figured an each()
function would do the trick:
$(this).find('td').each(function() {
console.log('test');
});
This didn't work though.
I need to get this content field but I didn't know how so I added an ongoing number to every td
field to target it.
@if (isset($row->details->view))
@include($row->details->view, ['row' => $row, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, 'content' => $data->{$row->field}, 'action' => 'browse'])
If anybody knows how to access the content I'd greatly appreciate it.
SOLUTION: this one helped me:
<script type="text/javascript">
$(document).ready(function(){
$('a[href^="http://"]').each(function(){
var oldUrl = $(this).attr("href"); // Get current url
var newUrl = oldUrl.replace("http://", "https://"); // Create new url
$(this).attr("href", newUrl); // Set herf value
});
});
</script>