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,399 • Replies: 0
No top replies

 
 

Related Topics

 
  1. Forums
  2. » Links not working in javascript
Copyright © 2019 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 10/21/2019 at 12:11:28