I'm using Jquery tabs to display some contents from a content query webpart (used this article:http://www.sharemuch.com/2014/11/17/quickly-turning-your-content-query-web-part-display-into-a-jquery-tabs/).
My goal is to filter a content query web part using url query string (easy) but I want to use those tabs as filters (presentation).
If I click on a tab I want to reload the same page + url parameter (ex: test.aspx?tabFilter=1 --> click on tab 1)
I will use this parameter with my cqwp.
I'm not able to create the href in the tab name with the jquery.
The page seems to be looping...
anybody could help ?
<script>
$(function() {
var tabCount = 0;
$(".dfwp-item div.groupheader").each(function() {
$("#tabs ul").append("<li><a href='"+encodeURI(test.aspx?Myfilter="+$(this).text())+"'>" + $(this).text()+"</a></li>");
$("#tabs").append("<div id='tabs-"+tabCount+"'>"+"<p> </p></div>");
$(this).parent().hide();
tabCount = tabCount+1;
});
$("#tabs").tabs({
select: function (e, ui) {
window.location.href=ui.tab.href;
}
});
});
</script>
<div id="tabs">
<ul>
</ul>
</div>