Hi guys,
I want to display in browser console the number of pages selected from my dashboard panel pagination.
I included that script to my dashboard <form stylesheet="style.css" script="script.js"> :
require(['splunkjs/mvc/simplexml/ready!'], function(){
require(['splunkjs/ready!'], function(){
console.log("hello from Script");
$(document).ready(function(){
$("#panel4 .splunk-paginator a").click(function (){
var value = $(this).text();
console.log("value: ",value);
});
});
});
});
The script can display hello from Script in the console, but no action from the click on the paginator.
PS. My jQuery selector is correct, I tested this following block from my browser console first:
$(document).ready(function(){
$("#panel4 .splunk-paginator a").click(function (){
var value = $(this).text();
console.log("value: ",value);
});
});
It works once, which means when I click on page 1, I got value: 1 but when I click on 2, nothing happens..
... View more