I have an categorised web view. When the view is collapsed and i have the mouse over the twistie, a pop-up (i.e. alt tag) appears, showing:“Show details for …”
Is there a way to prevent this pop-up from appearing???
I have an categorised web view. When the view is collapsed and i have the mouse over the twistie, a pop-up (i.e. alt tag) appears, showing:“Show details for …”
Is there a way to prevent this pop-up from appearing???
Subject: “Show details for…” - here is a JS function…
I wrote the following javascript function to modify this text and a couple of other things. I call it in the onload event of the view template.
function adjustTwisties(){
var twistieA = document.getElementsByTagName(“a”);
for (var x = 0; x < twistieA.length; x++ ) {
if(twistieA.innerHTML.indexOf(“collapse.gif”) > -1 || twistieA.innerHTML.indexOf(“expand.gif”) > -1 ) {
var twistie = twistieA.getElementsByTagName(“img”);
if(twistie[0].src.indexOf(“collapse.gif”) > -1){
twistie[0].title = “Collapse this category.”;
twistie[0].alt = “”;
}
if(twistie[0].src.indexOf(“expand.gif”) > -1){
twistie[0].title = “Expand this category.”;
twistie[0].alt = “”;
}
}
}
}
First I get all page links as assign it to the variable twistieA. Then I look through each of these until I find the expand or collapse graphic as part of the anchor tags HTML. If found, I find the actual twistie graphic and reset the “alt” attribute to empty quotes, then assign the text I wanted.
Here is one if you just want to hide the twistie so user’s can’t expand/collapse.
function hideTwisties(){
var twistie = document.getElementsByTagName("img");
for (var x = 0; x < twistie.length; x++) {
if(twistie[x].src.indexOf("collapse.gif") > -1
|| twistie[x].src.indexOf("expand.gif") > -1){
twistie[x].style.display="none";
}
}
}
Subject: RE: “Show details for…” - here is a JS function…
Good job!
Is it possible to change default icon path and image for twisties?
thanks by advance.
Subject: Thanks for your help