Ron Wolpa Posted October 2, 2013 Share Posted October 2, 2013 Dear friendsInside my html code there is a link , <a href="#" rel="privacy">CONSULT US</a> *</p> , that calls the function (as pasted below) which is in general.js file : Quote: $(function(){ $('#content:not(.nav_block)>dt:not(.active) a,footer .privacy:not(.active) a[rel=privacy]').live('click',function(){ var next=this.rel=='privacy'?$('#privacy'):$(this).parent().next(), width=next.width(), parent=next.parent(), visible=parent.find('>dd:visible').css({overflow:'hidden'}) parent.addClass('nav_block') $('#content>dt,.privacy').removeClass('active') $(this).parent().addClass('active') if(this.rel=='privacy')$('#content>dt>a').removeClass('active').animate({opacity:0}) if(parent.css('left')!=0) next.parent().animate({left:0}) next.show().css({width:'64px'}).stop().animate({width:width+'px'},{ step:visible.length?function(now){ visible.width(width-now) }:'',complete:function(){ next.css({overflow:'visible'}) visible.css({width:width+'px'}).hide() parent.removeClass('nav_block') }}) return false }) $('.active a,#content.nav_block').live('click',function(){ return false }) $('#content>dt>a:not(.active)').css({opacity:0}) .live('mouseover',function(){ $(this).stop().animate({opacity:1}) }) .live('mouseout',function(){ $(this).stop().animate({opacity:0}) }) .live('click',function(){ $(this).addClass('active').parent().siblings().find('>a').removeClass('active').stop().animate({opac ity:0}) }) }) Needing another link to work as "privacy" does , I tried to duplicate the function above by copying and pasting it below the original one. Then I replaced every "privacy" value by "page1" .It has not worked as expected.Below I pasted part of the html on which is "privacy". Quote: ..................... <dd id="privacy"> <div class="inner"> <article> content ............. </article> </div> </dd> The idea is to duplicate the code so that it will work as well with "page1" : Quote: <dt class="dt1"> <a href="#"></a> </dt> <dd id="page1"> <div class="inner"> </div> </div> </dd> I am not quite sure I´ve provided you with all the information necessary to support me. If that is the case please let me know and I will give you more info. Thank you very much. Link to comment Share on other sites More sharing options...
davej Posted October 2, 2013 Share Posted October 2, 2013 What is the definition of the .active style and where does it occur in the HTML? Link to comment Share on other sites More sharing options...
Ron Wolpa Posted October 9, 2013 Author Share Posted October 9, 2013 html :<div id="maincontainer"> <div id="slideshow"> <img src="images/bgSlider/img01.jpg" alt="" class="active" /> <img src="images/bgSlider/img02.jpg" alt="" /> <img src="images/bgSlider/img03.jpg" alt="" /> </div> </div>......................CSS :#slideshow IMG.active { z-index:10; opacity:1.0; } #slideshow IMG.last-active { z-index:9; } Apparently class .active has nothing to do with calling the function. There is a slideshow to change background image. It is where this class comes up. It is strange that it is there in the script code ?! Link to comment Share on other sites More sharing options...
davej Posted October 10, 2013 Share Posted October 10, 2013 (edited) What exactly does all this accomplish on the original page? What I see is a link that is not visible until you hover over it. Then when you click the link a blue border expands rightward around the link. The link then remains hidden even when you hover over it. Is that all that happens? Edited October 10, 2013 by davej Link to comment Share on other sites More sharing options...
Ron Wolpa Posted October 15, 2013 Author Share Posted October 15, 2013 (edited) The site in question is online : the link is www.mmkt.net.br.Please click on the link - *Consulte-nos* - in the footer. You´ll see the tab open.That means to click on * <a href="#" rel="privacy">Consulte-nos</a> * ;I located rel="privacy" into the file : http://mmkt.net.br/js/general.js;I have not been able to duplicate the function as described in the beginning of this post yet.Thank you. Edited October 15, 2013 by Ron Wolpa Link to comment Share on other sites More sharing options...
davej Posted October 16, 2013 Share Posted October 16, 2013 Try... <!DOCTYPE html><html><head><meta charset="utf-8"><title>tab title</title><style>#dv1{background-color:#eee;;border:1px solid black;border-radius:10px;height:200px;width:0px;opacity:0;position:absolute;left:200px;}#dv1 h3{color:blue;margin:20px 0 0 15px;}#lnk1:link{opacity:0.1;position:absolute;left:150px;top:160px;}#lnk1:hover{opacity:1;}</style><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script> $(document).ready(function(){ $("#lnk1").click(function(){ $("#dv1").animate({ left:'50px', opacity:'1', width:'300px' }); $("#lnk1").toggle(); });});</script> </head> <body><div id="dv1"><h3>Hello</h3></div><a href="#" id="lnk1">LINK</a></body></html> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now