Does this work on cfdb-datatable? Ive tried to insert code right after the cfdb shortcode but it does not work. My column name is Website
<script type=”text/javascript”>// <![CDATA[
(function ($) {
$(‘td[title=”Website”] div’).each(
function () {
$(this).html(‘‘ + $(this).html() + ‘‘);
})
})(jQuery);
// ]]></script>
You may have some syntax error. Try:
<script type="text/javascript">
(function ($) {
$('td[title="Website"] div').each(
function () {
$(this).html('<a href="http://' + $(this).html() + '">' + $(this).html() + '</a>');
})
})(jQuery);
</script>
Sorry to bother you, I used the code below and it works. Thanks I have one question. In the table the link appears as “www.//*****” Is there a way so what appears is different letters like the word “site” but have it still link to the page http://www.//***
[cfdb-table form=”myform”]
{{AFTER}}
<script type=”text/javascript”>// <![CDATA[
(function ($) {
$(‘td[title=”Website”] div’).each(
function () {
$(this).html(‘‘ + $(this).html() + ‘‘);
})
})(jQuery);
// ]]></script>
{{/AFTER}}
[/cfdb-table]