Jump to content

Search the Community

Showing results for tags 'JQuery'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. Hi all, I am using this product rotator and I am trying to make it work with various product on the same page. Is it possible to have multiple image rotators on a page? I'm doing a site that I would love to use this on, but when I add the second one, only the first one works, the rest doesn't.. Is there a way around it? I have tried adding different: id:'productImages, productImages-2, productImages-3',But still only the first one works. Can anyone please help with the re-writing of this script.Your help would be greatly appreciatedThank You -----------------------------------------------------------------------<script type="text/javascript"> $(document).ready(function(){ }); var tabber1 = new Yetii({ id: 'productImages', interval:3 }); </script>--------------------------------------------------------------------------Example can be seen and downloaded at http://www.dreamweavertutorial.co.uk/dreamweaver/video/product-image-rotator-zoomer-dreamweaver-part2.htm I have also tried using ----var $IR = jQuery.noConflict();------ but in vain
  2. Hey, I got some problems and i cant figure out whats wrong,i have a menu where you can filter the content displayed on the right.It works but it uses some weird animations and i can't figure out what's wrong.I use Quicksand for the filtering and the jQuery Easing Plugin for the animations. The link:http://bram-de-leeuw.nl/test/portfolio/index.html Thanks in advance!
  3. Hello there. I am implementing a JavaSript menu into my company's website, but seemed to have run into a snag. An existing script on the page is interfering with the new JavaScript menu. It is the JGlideMenu found here: http://www.sonicradish.com/labs/jGlideMenu/current/index.htmlI am using the inline example found on their page. I have the menu placed in a PHP side bar that acts as a persistent navigation that is conditionally fixed. The sidebar uses JQuery to switch from a static postion to a fixed position when reaching a certain scroll point. The JGlideMenu works great until I do any scrolling of the page. At that point the menu no longer functions. Instead the "rel" link (#tile_002), which is the next "slide" of the menu is placed at the end of the url. You can check out our website here to see what I'm talking about: mlkishigo.com/home-2012.html If I disable the conditionally fixed jquery it corrects the problem with JGlideMenu. But obviously I need them both to work. Any advice you have would be VERY MUCH appreciated. And please let me know if you need any other info to trouble shoot this. Thanks!
  4. sepoto

    Twitter.

    I have this code that does some AJAX to go back into my database and extract an array of bars. I have developed the code to change one of my div's to display all the data for each bar. In addition to displaying the data I also need to modify the contents of #latestFromDSGbuffer to contain a twitter feed of 5 tweets each per bar that was queried. I have tried a number of samples but for some reason I am able to get the twitter samples working in a sandbox but when I try to integrate that code things don't seem to be working out. I don't know if maybe that is because I was trying to call $.ajax(); inside of the callback function from another $.ajax(). Maybe the design needs to be modified? Maybe I should use some DOM storage to store barLocations? I'm wondering what to do with it. All of the data is located in "barLocations". Although I have attempted to make "barLocations" "global" I am not able to access it from within button.onclick where it is showing as "undefined". $.ajax({ url: 'ajax.php', data: { lat: results[0].geometry.location.lat(), lng: results[0].geometry.location.lng(), radius: radius }, type: 'post', success: function(output) { barLocations = $.parseJSON(output); //alert(obj[0].lat); /* So now that we have the JSON encoded array it has to be displayed into one of the div's probably below the map someplace */ var newInnerHTML = ""; for(var i = 0; i < barLocations.length; i++) { newInnerHTML = newInnerHTML + "<strong>" + barLocations[i].company + "</strong></br>"; newInnerHTML = newInnerHTML + barLocations[i].first_name + " " + barLocations[i].last_name + "</br>"; newInnerHTML = newInnerHTML + barLocations[i].street_address1 + "</br>" + barLocations[i].street_address2 + "</br>" + barLocations[i].city + "</br>"; newInnerHTML = newInnerHTML + "Phone: " + barLocations[i].phone_number + "</br>"; newInnerHTML = newInnerHTML + "Email: " + barLocations[i].email + "</br>"; newInnerHTML = newInnerHTML + "Website: " + barLocations[i].website + "</br>"; newInnerHTML = newInnerHTML + "<a href=\"standardprofile.php\" target=\"_blank\">Profile page >>>></a>"; newInnerHTML = newInnerHTML + "</br></br>"; } for (i = 0; i < barLocations.length; i++) { var markerImage = 'image/baricon.png'; marker = new google.maps.Marker({ position: new google.maps.LatLng(barLocations[i].lat,barLocations[i].lng), map: map, icon: markerImage, title: barLocations[i].company }); } if(barLocations.length > 0) { document.getElementById('divBarLocations').innerHTML = newInnerHTML; } } }); Thanks in advance for any help comments or commentary. Your input is most welcome... The whole code looks more like this: (function() { var map, geocoder, marker, infowindow, barLocations; window.onload = function() { $('#hdivBarLocations').hide(); // Creating a reference to the mapDiv var mapDiv = document.getElementById('map'); // Creating a latLng for the center of the map var latlng = new google.maps.LatLng(37.09, -95.71); // Creating an object literal containing the properties // we want to pass to the map var options = { center: latlng, zoom: 4, mapTypeId: google.maps.MapTypeId.ROADMAP }; // Creating the map map = new google.maps.Map(mapDiv, options); // Getting a reference to the HTML form var button = document.getElementById('addressButton'); // Catching the forms submit event button.onclick = function() { button.disabled = true; // Getting the address from the text input var address = document.getElementById('addressBox').value; var radius = document.getElementById('radialDistance').value; // Making the Geocoder call getCoordinates(address, radius); // Preventing the form from doing a page submit //return false; $('#hdivBarLocations').show(); } } // Create a function the will return the coordinates for the address function getCoordinates(address, radius) { // Check to see if we already have a geocoded object. If not we create one if(!geocoder) { geocoder = new google.maps.Geocoder(); } // Creating a GeocoderRequest object var geocoderRequest = { address: address } // Making the Geocode request geocoder.geocode(geocoderRequest, function(results, status) { // Check if status is OK before proceeding if (status == google.maps.GeocoderStatus.OK) { //Go back in for some data. document.getElementById('divBarLocations').innerHTML = "No bars found in your area..."; $.ajax({ url: 'ajax.php', data: { lat: results[0].geometry.location.lat(), lng: results[0].geometry.location.lng(), radius: radius }, type: 'post', success: function(output) { barLocations = $.parseJSON(output); //alert(obj[0].lat); /* So now that we have the JSON encoded array it has to be displayed into one of the div's probably below the map someplace */ var newInnerHTML = ""; for(var i = 0; i < barLocations.length; i++) { newInnerHTML = newInnerHTML + "<strong>" + barLocations[i].company + "</strong></br>"; newInnerHTML = newInnerHTML + barLocations[i].first_name + " " + barLocations[i].last_name + "</br>"; newInnerHTML = newInnerHTML + barLocations[i].street_address1 + "</br>" + barLocations[i].street_address2 + "</br>" + barLocations[i].city + "</br>"; newInnerHTML = newInnerHTML + "Phone: " + barLocations[i].phone_number + "</br>"; newInnerHTML = newInnerHTML + "Email: " + barLocations[i].email + "</br>"; newInnerHTML = newInnerHTML + "Website: " + barLocations[i].website + "</br>"; newInnerHTML = newInnerHTML + "<a href=\"standardprofile.php\" target=\"_blank\">Profile page >>>></a>"; newInnerHTML = newInnerHTML + "</br></br>"; } for (i = 0; i < barLocations.length; i++) { var markerImage = 'image/baricon.png'; marker = new google.maps.Marker({ position: new google.maps.LatLng(barLocations[i].lat,barLocations[i].lng), map: map, icon: markerImage, title: barLocations[i].company }); } if(barLocations.length > 0) { document.getElementById('divBarLocations').innerHTML = newInnerHTML; } } }); circ = null; var circ = new google.maps.Circle({ map: map, radius: radius * 1609.344 }); circ.setCenter(results[0].geometry.location); // Center the map on the returned location map.setCenter(results[0].geometry.location); map.fitBounds(circ.getBounds()); google.maps.event.trigger(map,'dragend'); var markerImage = 'image/home.png'; // Check to see if we've already got a Marker object if (!marker) { // Creating a new marker and adding it to the map marker = new google.maps.Marker({ map: map, icon: markerImage }); } // Setting the position of the marker to the returned location marker.setPosition(results[0].geometry.location); // Check to see if we've already got an InfoWindow object if (!infowindow) { // Creating a new InfoWindow infowindow = new google.maps.InfoWindow(); } // Creating the content of the InfoWindow to the address // and the returned position var content = '<span style="color: black;">Your location.</span>'; // Adding the content to the InfoWindow infowindow.setContent(content); // Opening the InfoWindow infowindow.open(map, marker); } }); }})();
  5. hey guys Basically i am trying to create a validation for the form. I want it to check if it can connect to the DB and if true to proceed to another page and if false to return an error. I am inputting the wrong details to make it just display the error but somehow it always returns "TRUE" on page load... and everytime i click the submit it doesnt do anything regardless of my entry... Can anyone tell me why? <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function(){var u = $('#username');var s = $('#server');var p = $('#password'); $('#iValForm').submit($.post("connect.php", {u: u.val(),p: p.val(),s: s.val()}, function(fd){ if (fd == "true"){ alert("Is: " + fd); return false; } // if1 if (fd == "false"){ alert("Is2: " + fd); return false; } // if2} //post function) //Post) //submit }) //document </script></head> <body> <form class="iValForm" id="iValForm" method="post" action=""><fieldset><legend id="error"> </legend><p><label for="username">Username </label><input id="username" name="username" class="required" /> </input></p><p><label for="password">Password</label> <input id="password" name="password" class="required"/> </input></p><p><label for="server">Server</label> <input id="server" name="server" class="required"/> </input></p><p> <input class="submit" id ='submit' type="submit" value="Submit"/></p></fieldset></form> connect.php <?php$user = $_POST['u'];$password = $_POST['p'];$server = $_POST['s'];@$con = mysql_connect ($server, $user, $password); if (!$con) {$response = 'false';echo $response;} else { $response = 'true'; echo $response;}?>
  6. Hello! I'm new here and I am dealing with a little problem which I hope you guys can help me with! What I want to achieve: Basically what I want to happen is that when the logo gets hovered the black message box will fade in using css transitions. Take a look at the image below and you will get me. And when the mouse moves away from the logo the message box fades out to zero again. But something is wrong, I dont know what. https://docs.google.com/file/d/0B0ONzhkyFUwhQXNOTFJzb0lVSFE/edit?pli=1 <-- image to make you understand. What I am dealing with: Thanks for staying with me, here is my HTML, CSS AND jQuery HTML: <div id="colume"> <div id="logo-to-hover"><a href="#"><img src="images/villave-logo.png" alt="villave-logo" width="220" height="53" /></a> </div> <!-- end logo-to-hover--> </div> <!-- end colume--> <div id="message"> <div id="box-1" class><p>Byggvareforhandler</p> </div> <!-- end box1 --> </div><!-- end message--> jQuery: <script>$(function() { $( "#logo-to-hover" ).hover(function() { $( "#box-1" ).toggleClass( "box-a"); return false; });}); </script> CSS: #logo-to-hover { width: 220px; height: 55px; margin-right: 20px; float: left; } #boxes { width: 940px; height: 71px; margin-left: auto; margin-right: auto; position: absolute; } #box-1 { height: 44px; width: 200px; margin-left: 10px; margin-right: 10px; background-image: url(../images/hoverbg.png); float: left; text-align: center; opacity: 0; -webkit-transition: all 0.4s ease-in-out;-moz-transition: all 0.4s ease-in-out;-o-transition: all 0.4s ease-in-out;-ms-transition: all 0.4s ease-in-out;transition: all 0.4s ease-in-out; }.box-a { opacity: 1; -webkit-transition: all 0.4s ease-in-out;-moz-transition: all 0.4s ease-in-out;-o-transition: all 0.4s ease-in-out;-ms-transition: all 0.4s ease-in-out;transition: all 0.4s ease-in-out; }
  7. I'm using Firefox 13.0.1. In my local WAMP jPlayer video is playing perfectly.I'm using webm file. So it should work on live server firefox as well. But instead of firefox it works fine in Chrome. videoPlaylist = new jPlayerPlaylist({ jPlayer: "#jquery_jplayer_1", cssSelectorAncestor: "#jp_container_1" }, [{ webmv: "video.webm" }], { swfPath: "js", autoPlay: false, supplied: "webmv", wmode: "window", size: { width: "440px", height: "270px", cssClass: "jp-video-270p" } }); swf path is correct. Flash in installed on server. Because audio player works fine in firefox.Can anyone point what i'm missing?
  8. So I have a standard two level menu in one php file that I show on all the pages on a website. The menus and submenus are nested <ul> elements. When you go to a page, I would like the submenu that includes that page to be open by default. And also to stay open if another submenu isn't hovered over. I think I can figure out the menu transformations. The part I need help on is finding the submenu that the active page is contained in so I can set that one to be open.
  9. Hey! I'm working on an custom map, i have the map from google and altert the style it all works.But i would like to show a HTML5 movie in an overlapping div and then fade it out afer it is finished.This is what i got so far: Jquery: <script type="text/javascript">$('#soundlogo').delay(400).fadeOut(400);</script> CSS: #soundlogo { height:100%;width:100%;display:block; background-color:#FFF;position:fixed;z-index:100;} body: <body onload="initialize()"> <div id="soundlogo"> <video width="100%" autoplay> <source src="video/soundlogo-web.mp4" type="video/mp4" /> Your browser does not support the video tag.</video> </div><div id="nav"><strong>Mode of Travel: </strong><select id="mode" onchange="calcRoute();"> <option value="DRIVING">Driving</option> <option value="WALKING">Walking</option> <option value="BICYCLING">Bicycling</option></select></div> <div id="map_canvas" style="width:100%; height:100%"></div> </body> Problem is that the fade never occurs,thanks in advance!
  10. In the name of GOD hi guys:which one is most important javascript , jquery or ajax ?for learning JQuery is necessary learning something befor learning JQuery for example javascript or ....?Do you know some books for Beginners ?Thanks for your helping.
  11. http://superdit.com/2011/08/11/23-slider-with-pricing-design-showcase/ ^ How to produce that? is there already something like that in jquery? If so please let me know or give a constructive suggestion that can help :s Thank you
  12. I have two different plugins in my page but they don't work together. http://www.wedub4u.com/es/inicio_es.html Any ideas how to make them work? This is the relevant code: <head><link rel="stylesheet" type="text/css" href="http://wedub4u.com/style2.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script><script type="text/javascript" src="js/jquery.jqDock.min.js"></script><script type="text/javascript">$(function(){var jqDockOpts = {align: 'left', duration: 200, labels: 'tc', size: 48, distance: 85};$('#jqDock').jqDock(jqDockOpts);});</script> <script type="text/javascript" src="http://wedub4u.com/js/simplegallery.js"></script> </head> <!-- BEGIN DOCK 1 ============================================================ --><div id="dockContainer"><ul id="jqDock"><li><a class="dockItem" href="http://wedub4u.com/es/inicio_es.html"><img src="http://wedub4u.com/images/icons/menu1/homesm.png" alt="inicio" title="Inicio" /></a></li> <li><a class="dockItem" href="#map"><img src="http://wedub4u.com/images/icons/sitemap.png" alt="mapa del sitio web" title="Mapa Web"/></a></li> <li><a class="dockItem" href="http://wedub4u.com/es/inicio_es.html"><img src="http://wedub4u.com/images/icons/about.png" alt="información" title="Info"/> </a></li> <li><a class="dockItem" href="http://wedub4u.com/es/inicio_es.html"><img src="http://wedub4u.com/images/icons/menu1/portfsm.png" alt="galerias" title="Galerías"/> </a></li> <li><a class="dockItem" href="#contact"><img src="http://wedub4u.com/images/icons/menu1/email2sm.png" alt="contacto" title="Contacto"/> </a></li> <li><a class="dockItem" href="http://wedub4u.com/es/inicio_es.html"><img src="http://wedub4u.com/images/icons/menu1/dealssm.png" alt="ofertas" title="Ofertas"/> </a></li> <li><a class="dockItem" href="http://wedub4u.com/es/inicio_es.html"><img src="http://wedub4u.com/images/icons/menu1/storesm.png" alt="tienda" title="Tienda"/> </a></li> </ul> </div><!--end div .dock #dock--> <!-- END DOCK 1 ============================================================ --> <div id="slider"> <!--* Simple Controls Gallery- © Dynamic Drive DHTML code library (www.dynamicdrive.com)* This notice MUST stay intact for legal use* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more--> <div id="simplegallery1"><script type="text/javascript">var mygallery=new simpleGallery({wrapperid: "simplegallery1", //ID of main gallery container,dimensions: [1020, 600], //width/height of gallery in pixels. Should reflect dimensions of the images exactlyimagearray: [["http://wedub4u.com/images/slider/4.png", "", "_new", ],["http://wedub4u.com/images/slider/1.png", "", "_new", ],["http://wedub4u.com/images/slider/2.png", "", "_new", ],["http://wedub4u.com/images/slider/3.png", "", "_new", ],["http://wedub4u.com/images/slider/4.png", "", "_new", ],["http://wedub4u.com/images/slider/1.png", "", "_new", ],["http://wedub4u.com/images/slider/2.png", "", "_new", ],["http://wedub4u.com/images/slider/3.png", "", "_new", ],["http://wedub4u.com/images/slider/4.png", "", "_new", ],["http://wedub4u.com/images/slider/1.png", "", "_new", ],["http://wedub4u.com/images/slider/2.png", "", "_new", ],["http://wedub4u.com/images/slider/3.png", "", "_new", ], ],autoplay: [true, 2500, 10], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]persist: false, //remember last viewed slide and recall within same session?fadeduration: 2000, //transition duration (milliseconds)oninit:function(){ //event that fires when gallery has initialized/ ready to run//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))},onslide:function(curslide, i){ //event that fires after each slide is shown//Keyword "this": references current gallery instance//curslide: returns DOM reference to current slide DIV (ie: try alert(curslide.innerHTML)//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)}}) </script></div> </div> <!--end div slider--> <div id="logodinamic"><script type="text/javascript">var mygallery=new simpleGallery({wrapperid: "logodinamic", //ID of main gallery container,dimensions: [230, 125], //width/height of gallery in pixels. Should reflect dimensions of the images exactlyimagearray: [["http://wedub4u.com/images/textlogo/log11.png", "", "_new", ],["http://wedub4u.com/images/textlogo/log21.png", "", "_new", ],["http://wedub4u.com/images/textlogo/log31.png", "", "_new", ],["http://wedub4u.com/images/textlogo/log41.png", "", "_new", ],["http://wedub4u.com/images/textlogo/log11.png", "", "_new", ],["http://wedub4u.com/images/textlogo/log21.png", "", "_new", ],["http://wedub4u.com/images/textlogo/log31.png", "", "_new", ],["http://wedub4u.com/images/textlogo/log41.png", "", "_new", ],["http://wedub4u.com/images/textlogo/log11.png", "", "_new", ],["http://wedub4u.com/images/textlogo/log21.png", "", "_new", ],["http://wedub4u.com/images/textlogo/log31.png", "", "_new", ],["http://wedub4u.com/images/textlogo/log41.png", "", "_new", ],],autoplay: [true, 2500, 10], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]persist: false, //remember last viewed slide and recall within same session?fadeduration: 2000, //transition duration (milliseconds)oninit:function(){ //event that fires when gallery has initialized/ ready to run//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))},onslide:function(curslide, i){ //event that fires after each slide is shown//Keyword "this": references current gallery instance//curslide: returns DOM reference to current slide DIV (ie: try alert(curslide.innerHTML)//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)}}) </script></div>
  13. I created a web page in which the logo is a slide show that changes in color according to the picture that is on the main slide show. http://www.wedub4u.com/ But when the effect is lost if both slideshows don't start at the same time. And the first time the bigger slide show requires more time to preload the images. Any ideas in how to sync both slideshows so they start at the same time?
  14. I am now familiar with the existence of the ".draggable()" function of jQuery. I am mulling over how I would integrate the dragging and dropping of an element into an event listener like this one: google.maps.event.addListener(myMap, 'click', function(myEvent){var myClickLatLng=myEvent.latLng;// now process myClickLatLng}); First I am wondering if the dragging and dropping of an element would constitute a 'click' and second if the click event is fired how am I to know which element was dropped? Again I thank all of you for your time and wisdom. I am hoping my post is in the right forum as this is for JavaScript which is closely related. Thank You!
  15. I created a fisheye menu and it was working well, until I added an autoslider that uses a different JQuery library version.Now the slider works, but not the fisheye menu. I tried adding the NoConflict, but it didn't work. This is my website: http://www.wedub4u.com/ This is the relevant code at the head of my document: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">var jq132 = jQuery.noConflict();</script><script type="text/javascript" src="js/fisheye-iutil.min.js">var jq132 = jQuery.noConflict();</script><script type="text/javascript" src="js/dock-example1.js">var jq132 = jQuery.noConflict();</script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js">var jq160 = jQuery.noConflict();</script><script type="text/javascript" src="js/simplegallery.js">var jq160 = jQuery.noConflict();</script> <!--* Simple Controls Gallery- © Dynamic Drive DHTML code library (www.dynamicdrive.com)* This notice MUST stay intact for legal use* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more--> <script type="text/javascript">var jq160 = jQuery.noConflict();var mygallery=new simpleGallery({wrapperid: "simplegallery1", //ID of main gallery container,dimensions: [1020, 600], //width/height of gallery in pixels. Should reflect dimensions of the images exactlyimagearray: [["http://wedub4u.com/images/slider/1.png", "http://wedub4u.com/index.html", "_new", "description"],["http://wedub4u.com/images/slider/2.png", "http://wedub4u.com/index.html", "_new", ],["http://wedub4u.com/images/slider/3.png", "http://wedub4u.com/index.html", "_new", ],["http://wedub4u.com/images/slider/4.png", "http://wedub4u.com/index.html", "_new", "description"]],autoplay: [true, 2500, 10], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]persist: false, //remember last viewed slide and recall within same session?fadeduration: 2000, //transition duration (milliseconds)oninit:function(){ //event that fires when gallery has initialized/ ready to run//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))},onslide:function(curslide, i){ //event that fires after each slide is shown//Keyword "this": references current gallery instance//curslide: returns DOM reference to current slide DIV (ie: try alert(curslide.innerHTML)//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)}}) var jq132 = jQuery.noConflict(); </script> And this is the code at the body for both elements:Fisheye Menu <!-- BEGIN DOCK 1 ============================================================ --><div id="dock"> <div class="dock-container"> <a class="dock-item" href="index.html"> <span>Home</span> <img src="http://wedub4u.com/images/icons/menu1/homesm.png" alt="home"/> </a> <a class="dock-item" href="#map"> <span>Sitemap</span> <img src="http://wedub4u.com/images/icons/sitemap.png" alt="sitemap"/> </a> <a class="dock-item" href="index.html"> <span>About</span> <img src="http://wedub4u.com/images/icons/about.png" alt="about"/> </a> <a class="dock-item" href="index.html"> <span>Portfolio</span> <img src="http://wedub4u.com/images/icons/menu1/portfsm.png" alt="portfolio"/> </a> <a class="dock-item" href="#contact"> <span>Contact</span> <img src="http://wedub4u.com/images/icons/menu1/email2sm.png" alt="contact"/> </a> <a class="dock-item" href="index.html"> <span>Promotions</span> <img src="http://wedub4u.com/images/icons/menu1/dealssm.png" alt="deals"/> </a> <a class="dock-item" href="index.html"> <span>Store</span> <img src="http://wedub4u.com/images/icons/menu1/storesm.png" alt="store"/> </a> </div><!--end div .dock-container--></div><!--end div .dock #dock--><!-- END DOCK 1 ============================================================ --> SLIDER <div id="slider"> <div id="simplegallery1"></div> </div> <!--end div slider--> Any suggestions?
  16. Hi folksI'm trying to initiate a click event (and subsequent image fade in) when a user clicks on a thumbnail. That in itself isn't such a problem. The problem lies in the fact that the thumbnails are contained in an array and are displayed with an append within an each loop (see code below). I've gotten halfway there, the code below does initiate a fade in when a thumbnail is clicked - however, it fades in all the images as opposed to just the one relating to the thumbnail that is clicked on. I know this is because by the time the #test append happened all the images have loaded so it just displays all of them. The question is, how can I get it to just display the full image related to the thumbnail that's been clicked on? I'm pretty new to this so apologies if this seems a bit pedestrian. Thanks in advanceStef For reference purposes:array[0] refers to id of imagearray[6] is the thumbnail urlarray[7] is the full image urlarray[8] & array[9] are x and y coordinates of the thumbnail on the page function display (array) { $.each(array, function(i){ $('#container').append( '<div id="'+array[i][0]+'" style="position: absolute; left:'+array[i][8]+'px; top: '+array[i][9]+'px;"><img src=images/'+array[i][6]+' id=nav width=85 height=85></div>' ); $('#test').append( '<div id="'+array[i][0]+'" style="width: 398px;"><img src=images/'+array[i][7]+' id=nav width=398>' ); $("#"+array[i]).click(function () { $("#test").fadeIn('slow', function () {// animation complete}); }); });} Full page attached upload.php
  17. Guest

    Jparallax jquery no movement

    Hi I am new to jquery and jparallax.I have been following the tutorials on the jparallax page: http://webdev.stephband.info/parallax.htmland been looking at the source of demo: http://webdev.stephband.info/parallax_demos.htmland have been trying to implement this into a site I am creating for a friend. My parallax attempt can be found here: http://greenavenueshull.atwebpages.com/parallax.html If you look at the source it is all pretty self explanatory.The images "bf01.png" and "bf02.png" are the 2 butterflies, 01 being blue, 02 being purple, they are both right by each other but as you can see only the blue butterfly is visible, and it does not move a lá parallax. I have been reading and writing and rewriting...I just cant see what I am doing wrong. Can anybody please help?
  18. I want to define http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js as $jquerylink in a variable, so that I can link them by just typing $jquerylink.
  19. Hello all, I developed pop-out slider menu that builds itself from the CSS rules and HTML content. Unfortunately I designed it around a $('.menuElement .uniqueMenuClass') strategy. Basically I have a handful of menus that do the same thing but with multiple copies of the pop-out menu script plugin with renamed '.uniqueMenuClass' for the respective menus. Example: $('.sliderMenu .menuOne').ready(function buildSlider(){ var sliderWidth = $('.sliderMenuElement .menuOne').width(); // A series of CSS dependent variables... $('.sliderMenuElement .menuOne').mouseenter(function animatedStuff(){ //series of animations triggered });} I'd then go back and copy/paste the whole thing with .menuTwo. Stupid, I know. Now, I'm trying to do something like this... $('.sliderMenu').ready(function buildSlider(){ var sliderWidth = $(this).find('.sliderMenuElement').width(); //Series of CSS dependencies... $(this).find('sliderMenuElement').mouseenter(function animatedStuff(){ //series of animations triggered });}); The problem is that .find() runs through ALL of the menuSlider's. Should I assign a unique ID to the menus and all their descendants and store the ID in all the variables and functions? Is there a way to traverse just within the $(this) element? or clear all the variables so the next menu starts clean-slate? Is this why I should have structured with lists instead of nested divs? Children aren't practical because I'm accessing a number of elements at different levels in the tree; the examples above are very simplified. Appreciate the help! Here's a link to a test version... which takes a while to load because of the multiple script references: www.jaredadradtke.com/testersite/index.html And please no comments on the reel labeled 'webdesign' Also... here's an example of the HTML: <div class="autoSlider"> <div class="slideCont" style="top:0px;"> <div class="sliderName">Reels</div> <div class="sliderInitial"> <div class="slideEndCap leftCap"></div> <div class="slideEndCap rightCap"></div> <div class="thumbCont reels"> <div class="slideThumb reels"> <span class="thumbCaption">Motion Design</span> </div> <div class="slideThumb reels"> <span class="thumbCaption">Cinematography</span> </div> <div class="slideThumb reels"> <span class="thumbCaption">Web Design</span> </div> <div class="slideThumb reels"> <span class="thumbCaption">Color Grading</span> </div> </div> </div> </div></div>
  20. Okay, I understand what it does, but I'm having troubles understanding the process of the set/getCookie functions given as examples in the w3schools tutorial.I'm a jQuery junkie trying to ramp up to serious scripting (eventually with Ajax and PHP as its becoming apparent). While the school lessons have been invaluable I notice they don't always have a comprehensive list of objects, methods, or actions that can be done. For instance in the Cookie examples, how where does 'exdays' get defined, what do escape() and unescape() do, etc. I understand parts but others seem completely unexplained. Are there any more comprehensive explanations of the cookie?Also, another example, they talk about the setTimeout and clearTimeout, but I never saw setInterval anywhere... that seems like an important thing to leave out of the school so I'm assuming there's 'gotta be a site out there where a full list of events and objects is being updated more regularly.Thanks!
  21. Hello All, So you frequently see reductions with commonly used objects such as: var $this = $(this)//Or....var $objectName = $('.className') Is there any places or reason why you would chose to use the $ before the var name to create an object as oppose to just making a normal variable? I'm looking to find and replace the objects with these sorts of variables to reduce file size, make it easier to read, and hopefully speed up load time but to check with experts before I potentially F#$! up my work. Thoughts? Also, any thoughts on how to structure code (in general) to run most efficiently would be helpful. I auditioned a very scant, un-skinned version of my page on the server and it took much longer than I expected to load (on my itty bitty netbook of which I think some cell phones have more processing power). Thanks!
  22. I'm not sure if this is the best place to ask this, but I'm not sure which section it fits best under. I've been asked to build a site that smoothly scrolls content and I don't know where to start. I'm trying to build something like the top part of this site where you click on the arrows and it scrolls to another set of stories. I've tried to disect the code on the site, but when I try to implement it myself it doesn't work. I pressume it's some sort of jquery plugin but that's as far as I've got with it. I'd be grateful for any help on this as I've been trying to work it out for months and haven't got anywhere - except now have less hair!! Thanks.
  23. Okay, here is the problem, the background to it is a little bit lengthy but please bear with me as I think it's probably essential to getting to the root of it. I'm trying to design an on-site navigation system using straight javascript and jquery. The site is for a photographer who has a number of galleries of her images she wants to put up. These are displayed on the page as a series of thumbnails which are arranged in a grid (lets say 3 by 3 here for simplicity's sake). The idea is that these can either be displayed in order of size or in order of the date the gallery was updated. There are two buttons at the top of the page 'size' and 'date' and whenh one of these is clicked the thumbnails should animate into the new position. I've reduced the arrays to their essential parts for the purposes of this question. They're defined in the header of the page as follows: //order: id, gallery size, gallery date (UK format), thumbnail url. x position (px), y position (px) var galDate = new Array();galDate[0] = [0, 7, 12-2-2012,"images/image5.jpg", 100, 100]; galDate[1] = [6, 2, 1-2-2012,"images/image0.jpg", 200, 100]; galDate[2] = [4, 10, 24-1-2012,"images/image8.jpg", 300, 100]; galDate[3] = [9, 3, 11-12-2011,"images/image7.jpg", 100, 200]; galDate[4] = [7, 14, 4-8-2011,"images/image6.jpg", 200, 200]; galDate[5] = [2, 32, 3-8-2011,"images/image3.jpg", 300, 200]; galDate[6] = [8, 11, 10-6-2011,"images/image2.jpg", 100, 300]; galDate[7] = [5, 5, 1-6-2011,"images/image1.jpg", 200, 300]; galDate[8] = [3, 7, 3-4-2011,"images/image4.jpg", 300, 300]; var galSize = new Array();galSize[0] = [2, 32, 3-8-2011,"images/image3.jpg", 300, 200]; galSize[1] = [7, 14, 4-8-2011,"images/image6.jpg", 200, 200]; galSize[2] = [8, 11, 10-6-2011,"images/image2.jpg", 100, 300]; galSize[3] = [4, 10, 24-1-2012,"images/image8.jpg", 300, 100]; galSize[4] = [3, 7, 3-4-2011,"images/image4.jpg", 300, 300]; galSize[5] = [0, 7, 12-2-2012,"images/image5.jpg", 100, 100]; galSize[6] = [5, 5, 1-6-2011,"images/image1.jpg", 200, 300]; galSize[7] = [9, 3, 11-12-2011,"images/image7.jpg", 100, 200]; galSize[8] = [6, 2, 1-2-2012,"images/image0.jpg", 200, 100]; Displaying the thumbnails and the animation is handled by three functions: which are defined in the <head> section of the page as follows: 'Swap' loops through the all the rows in array 1 defining the id, x position and y position as variables id1, x1 and y1 (please forgive the 'document writes' this was part of an earlier debugging attempt) function swap(array1, array2){for(i=0; i<array1.length; i++){var id1 = array1[0];document.write ('id1: ' + id1);document.write ('<br />');var x1 = array1[3];document.write ('x1: ' + x1);document.write ('<br />');var y1 = array1[4];document.write ('y1: ' + y1);document.write ('<br />'); // For each row in the first array, 'Swap' then loops through the second array. When the ids are equal, this triggers the 'animate' function, which then should handle the actual animation for(j=0; j<array2.length; j++){var id2 = array2[j][0];document.write ('id2: ' + id2 );document.write ('<br />');var x2 = array2[j][3];document.write ('x2: ' + x2 );document.write ('<br />');var y2 = array2[j][4];document.write ('y2: ' + y2 );document.write ('<br />'); if (id2==id1){animate(x2, y2);} //close if else {document.write('for loop i should continue');document.write ('<br />'); } } //close for j } // close for i } // close function // 'Animate' is triggered when the ids from each of the arrays correspond and performs the animation (nb – this isn't working perfectly at the moment but the basic animation functionality is working – getting the right thumbnals to animate to the right places is something I have to come back to but its not the main problem at the moment). function animate(x2, y2){$("#"+i).animate({left:x2, top:y2},"slow");document.write ('animate function triggered');document.write ('<br />');} // The actual displaying of the thumbnails is handled by a third function called, surprisingly, 'display' which is as follows. function display (array) {for (i=0, max = array.length; i<max; i++){ $('#container').append('<div id="'+array[0]+'" style="position: absolute; left:'+array[6]+'px; top: '+array[7]+'px;"><a href="#"><img src='+array[5]+' height=75px width=75px></a></div>');}} I have all of the above in the this order in the header of the page. Finally, I have the jquery click function call which is as follows: $(document).ready(function() {$('#size').click(function() {swap (galSize, galDate);}); $('#date').click(function() {swap (galDate, galSize);}); display(galDate); }); The body of the page is as follows: <body><button id="size">Size</button> <button id="date">Date</button><div id="container"></div><script>display (galDate);</script></body> Just to be clear, I realise that some of the actual functionality isn't going to churn out the desired result in terms of positioning etc. The fact of the matter though is that the 'swap' function works in as far as it animates the images (I know because I've tested it!) :-) The problem I have (and thanks to those who've stayed with me thus far!) is that as soon as I click on one of the buttons (size or date) the displayed thumbnails disappear. The swap function is still working because all the 'document writes' display on the page and, similarly the animate function is triggered as well. Its just thet there are no thumbnails anymore and they're sort of central to the whole undertaking. As you can probably tell, I'm pretty new to this and there is no doubt an obvious explanation. The thing is, I don;t know what it is. Any ideas or nods in the right direction would be much appreciated. CheersStef
  24. I have a div animated by incremented margin-left when the user clicks a button. I would like to force the animation to stop at a specific margin-left value and callback a different animation. So if the user tries to click too far it prevents them from doing so. Suggestions? I'd like to do it with margin because it'd be easier to edit later, but if I have to use .position.left as a variable, I'll take the code for that just as well. Here's a wacky selector I tried, to no avail, if it helps convey my intention: $('.slidingDiv[style*=margin-left:80px]').stop().animate(.....); I didn't bind it to a .click because I want to be able to stop any-size div at any given point rather than map it out explicitly. Thanks!
  25. Hey All, I'm jumping back into some web design to update personal site (I usually do camera and computer effects so this is always liking diving back into a 12-foot pool at first).I was wondering how to script a jQuery selector so that it would select all other elements in the document that matched that specific class of the object that was clicked. The purpose is to click on a little mini-thumbnail in a slide that would bring up a "gallery widget" with the appropriate photo enlarged and its respective thumbnail in the widget highlighted, rather than just uploading the first in the set. The elements being selected are in an entirely different div/list so they can't be considered children.Do I need to use a variable? If so how (terrible with that part)?All help is greatly appreciated. Thanks! Jared Also, this wont be an issue with other classes being attached, will it?
×
×
  • Create New...