Search Results

Search found 5 results on 1 pages for 'antosha'.

Page 1/1 | 1 

  • AJAX deeplinking with jQuery Address

    - by antosha
    Hello, I have a website which has many pages: For example: HOME: http://mywebsite.com/index.html SOME PAGE: http://mywebsite.com/categorie/somepage.html I decided to make my pages load dynamically with AJAX without reloading the page. So I decided to use jQuery Address plugin ( http://www.asual.com/jquery/address/docs/ ) in order to allow deeplinking and Back-Forward navigation: <script type="text/javascript" src="uploads/scripts/jquery.address-1.2rc.min.js"></script> <script type="text/javascript"> $('a').address(function() { return $(this).attr('href').replace(/^#/, ''); }); </script> Now, after installing the plugin, if I go on http://mywebsite.com/index.html (HOME) and click on SOME PAGE link, jquery successfully loads the http://mywebsite.com/categorie/somepage.html without reloading the page and the address bar on my browser displays: http://mywebsite.com/index.html/#/categorie/somepage.html which is great! However, the problem is: if I copy this dynamically generated URL: http://mywebsite.com/index.html/#/categorie/somepage.html into a web browser address bar, it will take into my website index.html page and not to the "SOME PAGE" page. Also, The Forward/Back buttons don't work correctly, they only replace the address in the URL bar but the content stays the same. I suppose that I need to write some JavaScript rule that associates the dynamic URL with the correct page? Some help would be appreciated. Thanks :)

    Read the article

  • Google Maps geocoding (address to GLatLng)

    - by antosha
    Hi, I am trying to draw a geodesic polyline with Google Maps JavaScript API from two address points. <script type="text/javascript">// <![CDATA[ var polyOptions = {geodesic:true}; var polyline = new GPolyline([ new GLatLng(), new GLatLng() ], "#f36c25", 5, 0.8, polyOptions); map.addOverlay(polyline); if (GBrowserIsCompatible()) { map.addOverlay(polyline); } // ]]></script> Could someone tell me how can I dynamically geocode an address into GLatLng coordinates? (I am a little confused after reading Google's API documentation http://code.google.com/apis/maps/documentation/javascript/v2/services.html) Thanks :)

    Read the article

  • jQuery menu active link

    - by antosha
    Hello, I am trying to make a jquery menu that when I click on one of the links (without reloading the page), it changes its class to "active" and removes this class when I click on another link. here is my code : <script type="text/javascript"> $(document).ready(function() { $(".buttons").children().("a").click(function() { $(".buttons").children().toggleClass("selected").siblings().removeClass("selected"); }); }); </script> <ul class="buttons"> <li><a class="button" href="#">Link1</a></li> <li><a class="button" href="#">Link2</a></li> <li><a class="button" href="#">Link3</a></li> <li><a class="button" href="#">Link4</a></li> </ul> Can someone tell me why my code is not working and how to fix it? Thanks :)

    Read the article

  • jQuery : add css class to menu item based on browser scroller position

    - by antosha
    Hi, I have a menu: <ul class="menu-bottom"> <li id="m1" class="active"><a id="1" href="#"><span>Link 1</span></a></li> <li id="m2"><a id="2" href="#"><span>Link 2</span></a></li> <li id="m3"><a id="3" href="#"><span>Link 3</span></a></li> </ul> I want that depending of browser's scroller position, the "active" class goes the correct < li element. This is how I see it : if ($(document).height() == 500) { $('#m1').parent().addClass('active'). siblings().removeClass('active'); } if ($(document).height() == 1000) { $('#m2').parent().addClass('active'). siblings().removeClass('active'); } if ($(document).height() == 1500) { $('#m2').parent().addClass('active'). siblings().removeClass('active'); } I am not very familiar with jQuery Dimensions properties so this code doesn't make much sense, but I hope you get the idea. If someone could tell me how to make this work, it would be really cool. Thanks :)

    Read the article

  • [WORDPRESS] Return highest term_taxonomy_id

    - by antosha
    Hi guys, I am trying to return the highest term taxonomy id of a post page or a taxonomy page. I was sucessful at listing all taxonomy id's like this: <?php $terms = get_the_terms( $post->ID , 'mytaxonomy' ); if($terms) { foreach( $terms as $term ) { echo $term->term_taxonomy_id; } } ?> This is what I am trying to do (return only the highest ID) (doesn't work): <?php $terms = get_the_terms( $post->ID , 'mytaxonomy' ); if($terms) { foreach( $terms as $term ) { echo max( '$term->term_taxonomy_id'); } } ?> Please help :)

    Read the article

1