0
   

Links not working in javascript

 
 
Reply Fri 13 Apr, 2012 11:54 am
Greetings, i am using this function:

<script type="text/javascript">
$(function(){
$('li')
.css('pointer','default')
.css('list-style-image','none');
$('li:has(ul)')
.click(function(event){
if (this == event.target) {
$(this).css('list-style-image',
(!$(this).children().is(':hidden')) ? 'url(materiale/plus.gif)' : 'url(materiale/minus.gif)');
$(this).children().toggle('slow');}
return false;})
.css({cursor:'pointer', 'list-style-image':'url(materiale/plus.gif)'})
.children().hide();
$('li:not(:has(ul))').css({cursor:'default', 'list-style-image':'none'});});</script>

The problem is that my links are not opening anymore. Can anyone modify the function so that when clicking on an anchor it will corectly function and open in the parent page or in a new tab ? Thank you in advance.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 1,581 • Replies: 0
No top replies

 
 

Related Topics

How does one uninstall a program? - Question by Woollcott
Adding a JavaScript 'Copy to Clipboard' - Discussion by BobbyDouglas
JavaScript: OnSelect question - Discussion by neocode
Javascript - Control C textarea script - Discussion by Craven de Kere
2018123 - Question by ibk1995
javascript loops for - Question by vartul agnihotri
 
  1. Forums
  2. » Links not working in javascript
Copyright © 2021 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 12/07/2021 at 07:50:48