House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Talk (CF-Talk)

Is there an anchor in a URL String - SOLVED

Author:
Robert Harrison
09/02/2010 05:02 PM

>  This code: >  <script type="text/javascript"> >  <!-- alert(location.hash); //--> >  </script> Thanks Andy Matthews This was the key and I got it working. Was were using a jQuery expand/collapse function on a page that displayed FAQs. Initially it showed only the questions and expanded out the answer on click. Wanted to be able to create links that anchored to a specific question but it's kind of useless when the answer doesn't show. Got the function below out of it. Now, if an anchor exists it opens expanded and positions to the anchor. If no anchor, it shows the unopened question list.   <script type="text/javascript">     function anchorSet() {     if(location.hash !='') {        $j('div.answer').css('display', 'block');     }     }   </script> Appreciate the help. Just what I needed. Robert B. Harrison Director of Interactive Services Austin & Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or.  It must be &. Plug in to our blog: A&W Unplugged http://www.austin-williams.com/unplugged __________ Information from ESET Smart Security, version of virus signature database 5419 (20100902) __________ The message was checked by ESET Smart Security. http://www.eset.com


Search cf-talk

February 04, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29