[jQuery] basic news ticker
Hi there, I'm trying to write a news ticker script that horizontally slides 1 item from right to left in a box. Most news ticker scripts use multiple items for this, but my needs are somewhat different. Well I've kinda got it working, except for when I hover over it. Then when the cursor goes away, the speed's been affected as well as the item stops ticking by. Here is my code: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; head meta http-equiv=Content-type content=text/html; charset=utf-8 titlejQuery news ticker test/title style type=text/css media=screen #newsticker { width: 198px; border: 1px solid #999; overflow: hidden; height: 20px; padding: 2px; font: 12px Arial #000; } #newsticker ul { list-style: none; margin: 0px; padding: 0px; width: 600px; position: relative; } #newsticker ul li { display: inline-block; margin: 0px 5px; position: absolute; left: 200px; } /style script src=jquery-1.3.1.js type=text/javascript charset=utf-8/script script type=text/javascript charset=utf-8 $(document).ready(function() { function scroller() { $('#newsticker ul li').animate( {left: -200px}, 2000, linear, function(){ $(this).css(left, 200px); scroller(); } ) .hover( function(){ jQuery(this).stop() }, function(){ $(this).css(left, 200 - $(this).position().left); scroller(); }); }; scroller(); }); /script /head body onload= div id=newsticker ul litesting 1 - a href=test.htmltest/a/li /ul /div /body
[jQuery] basic news ticker
Hi there, I'm trying to write a news ticker script that horizontally slides 1 item from right to left in a box. Most news ticker scripts use multiple items for this, but my needs are somewhat different. Well I've kinda got it working, except for when I hover over it. Then when the cursor goes away, the speed's been affected as well as the item stops ticking by. Here is my code: $(document).ready(function() { function scroller() { $('#newsticker ul li').animate( {left: -200px}, 2000, linear, function(){ $(this).css(left, 200px); scroller(); } ) .hover( function(){ jQuery(this).stop() }, function(){ $(this).css(left, 200 - $(this).position().left); scroller(); }); }; scroller(); });
[jQuery] error - name.match is not a function
On line 782 of jquery-1.3.1.js this line of code makes this error: name.match is not a function. On line 782 there is: if ( name.match( /float/i ) ) I'm trying to write a news scroller This is my code: $(document).ready(function() { function scroller() { $(div#newsticker ul li).animate( $(this).css(left, -200px), normal, linear, function(){ $(this).css(left, 200px); scroller(); } ); } scroller(); }); Any help would be greatly appreciated.
[jQuery] Re: error - name.match is not a function
Ok this is what the solution should look like, but I'm not getting it working so that if I hover then the sliding should stop, and when hovering out, it should continue sliding again.: $(document).ready(function() { function scroller() { $('#newsticker ul li').animate( {left: -200px}, 2000, linear, function(){ $(this).css(left, 200px); scroller(); } ) .hover( jQuery(this).stop(), function(){ $(this).css(left, $(this).offset.left); scroller(); }); }; scroller(); }); On Feb 24, 12:15 am, Ettiene etti...@gmail.com wrote: On line 782 of jquery-1.3.1.js this line of code makes this error: name.match is not a function. On line 782 there is: if ( name.match( /float/i ) ) I'm trying to write a news scroller This is my code: $(document).ready(function() { function scroller() { $(div#newsticker ul li).animate( $(this).css(left, -200px), normal, linear, function(){ $(this).css(left, 200px); scroller(); } ); } scroller(); }); Any help would be greatly appreciated.
[jQuery] Simple Accordion menu script
Hi there, I've implemented the accordion menu from this site: http://www.i-marco.nl/weblog/jquery-accordion-menu-redux2/ It works vry well, markup is cleaner than any other jquery accordion script I've come across sofar, but I need some help with the functionality. Basically how this script works, is that when you click on an item with sub-items, it just expands the sub-items. How would one typically go about if you would like to navigate to one of the parent items and not just expand the sub-items.? Also can someone please help me implement this solution into the javascript? I'm not sure how to do it. Thanks Ettiene
[jQuery] Re: How to pass a jQuery object to PHP as an array
Have a look at JSON. PHP's got a json_encode function where you can encode variables/data to json, and then use in javascript. So I guess it could be done the other way around too. Ettiene On Nov 3, 7:10 am, GrootBaas [EMAIL PROTECTED] wrote: Hi all, Thank you in advance for you help I have the following object ... console.log($('.users').select('.name')); How can I pass this object as an hidden form field back to my PHP controller as an array? Current code ... document.save_logs.table.value = value; document.save_logs.submit(); ?=form_hidden('table','')?
[jQuery] idTabs and hoverintent
Hi there, I've implemented idTabs on a website and used the mouseover event to toggle between the tabs. Now I've been thinking of also integrating the hoverintent plugin, so the tabs only change when it looks like the user wants to hover there. Can anybody please help me with this? I've tried to chain the hoverintent command but it needs an on and off event, but I don't know where to get that from idTabs. Thanks Ettiene
[jQuery] Re: Dialog box that auto expands depending on content
Well I see in Firefox (using Firebug) that if you set div class=dialog_box ui-dialog-content ... to have height: auto then it'll expand as the content in the dialog expands. You using a Jquery UI dialog plugin? Ettiene On Oct 29, 12:51 pm, ryanhavoc [EMAIL PROTECTED] wrote: I have a form that I pull into a dialog box. I've set the dialog to have an auto height as an option and it sets the height when the form is pulled in. However I'm also using the validate plugin which when displaying an error message adds additional height the the form. However the dialog doesn't expand with this additional content. Does anyone know how I can make it do this? You can see a test of the dialog on this link: http://common.leeds-art.ac.uk/validate/openday_bookings/test.php Leave all the fields blank and you click save changes and you notice that some of the form disappears off the bottom of the dialog. Thanks Ryan
[jQuery] Re: ANNOUNCE: jQuery listnav plugin
Excellent stuff man! I'm already busy using it hehe Ettiene On Oct 3, 12:39 pm, Alexandre Plennevaux [EMAIL PROTECTED] wrote: arf, well, search engines would link to it directly in any case. So better indeed put a link back to the main project page :) LAb[au] _ *lab*oratory for *a*rchitecture and *u*rbanism Alexandre Plennevaux Lakensestraat 104 Rue de Laeken Brussel 1000 Bruxelles België _ Belgique _ Belgium tel: +32 (0)2 2196555 fax: +32 (0)2 4266986 mail: [EMAIL PROTECTED] [EMAIL PROTECTED]http://www.lab-au.com VAT: BE0475.210.720 On Fri, Oct 3, 2008 at 2:55 AM, Jack Killpatrick [EMAIL PROTECTED] wrote: Thanks Alexandre. I wondered how long it would take for someone to extract the demo url from the modal window and post it bare :-) ... I guess it's time for me to add a link to that to take folks back to the main info page. Thanks for the writeup! - Jack Alexandre Plennevaux wrote: very nice ! http://www.pixeline.be/blog/2008/listnav-jquery-plugin-_-really-nice-ui/ On Thu, Oct 2, 2008 at 9:52 PM, Jack Killpatrick [EMAIL PROTECTED] wrote: Hi All, Today we released our first jQuery plugin, which provides an easy way to add alphabet-based navigation to any UL or OL list. Here's a link to our announcement blog entry: http://blogs.ihwy.com/dev/post/jQuery-listnav-plugin-version-10-relea... And below is the info from the blog entry to save you the click. Thanks to Mike Alsup for his docs about creating jquery plugins, and a shout out to Liam Byrne, who helped me (via this list) a few months ago with some jQuery for isolating text inside of list items. - Jack blogged Today we're releasing a jQuery plugin that we created for the business directory section of a pet project site of ours, http://www.hwy9.com/Directory/boulder-creek.aspx. We'd always wanted to have a javascript-based control that we could easily apply to long lists of items to allow quickly navigating around the list. Since most lists are alphabetically sorted, we came up with a plugin that allowed us to have a long list and then, by binding the list to our jQuery listnav plugin, an alphabet-based navigation bar would magically appear above the list, showing all of the letters from A to Z. Clicking on a letter dynamically filters the list, so you can, for example, click on C and the list changes on-the-fly to show you only items beginning with C. There are lots of neat little features to the control. We've posted full information and demos here: http://www.ihwy.com/labs/jquery-listnav-plugin.aspx. A couple of the interesting features worth calling out are 1) that when you hover over a letter in the list navigation bar, a count appears above the letter, telling you how many items will appear if you click that letter 2) letters that don't have any items under them appear looking disabled, as a visual clue that there aren't any items starting with that letter (so that the user doesn't have to find out by clicking the letter). One of the demos (demo 4) also shows using the listnav plugin on a list that has floated items in it. In the demo, each list item looks like a box and they are arranged left-to-right, row by row. Clicking on a letter shows only the boxes that have wording that starts with that letter. This could be handy for making an address-book like layout on a web site: click the letter in the navigation to see the contacts that start with Y, for example. Each box can contain anything you want it to: the listnav control pays attention only to the first letter of the first text in the list item. The control has been optimized for speed. It's able to handle binding to lists with hundreds of items in them very quickly. Any jQuery selector can be used to bind to your lists, so you can bind it to multiple lists on a single page using just a CSS class name, if you want to. It works with UL and OL (numbered) lists. If you use an OL, the numbers restart themselves for each set of list items that appear (ie, if you click on 'C' and that has 5 items, they will appear numbered from 1-5). We hope you enjoy the jQuery listnav plugin. We enjoyed creating it.
[jQuery] superfish + bgiframe problem on IE6
Hi there, Well sorry if I'm asking a question that's been answered a lot already, but I just can't seem to get it working for me on IE6. I was recently involved in building the UI for www dot geotrust dot com ., but I can't get the bgiframe to work on IE6 on pages where the menu drops down over (or under) a select element. Was wondering if anyone could maybe have a look and give some insight into what I can do to fix it. the page in question is here: www dot geotrust dot com /about/contact/ support-form/index.html Thanks Ettiene
[jQuery] Re: superfish + bgiframe problem on IE6
hmm.. I thouhgt I was using the latest method :) I've downloaded the latest version of bgiframe which is currently on the server. So what you're saying is that I replace my (complicated) call to superfish in my head with the simple one like you listed, and it should do the trick? I'll try that in any case. Thanks Ettiene On Oct 3, 1:54 pm, Joel Birch [EMAIL PROTECTED] wrote: Hello Ettiene, There is now a much simpler and less buggy way of using bgIframe. It is described on the updated Superfish documentation page, here:http://users.tpg.com.au/j_birch/plugins/superfish/#sample2 You will need to make sure you are using the most up-to-date version of bgIframe which you can get here:http://brandonaaron.net/jquery/plugins/bgiframe/docs/#where_can_i_get_it The improved code for applying bgIframe to Superfish is this: $(document).ready(function(){ $(ul.sf-menu).superfish().find('ul').bgIframe({opacity:false}); }); Much simpler than the older method that you are currently using. Joel Birch.
[jQuery] Re: superfish + bgiframe problem on IE6
Ok, I'm struggling a bit here... My call in the head looks like this: $(document).ready(function(){ $(ul.nav).superfish() .find(liulli:has(ul)).addClass(isparent) .find('ul').bgIframe({opacity:false}); }); I've got that first find in there to add a class isparent to all li's that have a ul in them, basically if they have dropdown menus. The second find is for the bgiframe code But this doesn't do anything in IE6. Unfortunately I can't update the code on the geotrust website before I've fixed it. Thanks Ettiene On Oct 3, 2:10 pm, Ettiene [EMAIL PROTECTED] wrote: hmm.. I thouhgt I was using the latest method :) I've downloaded the latest version of bgiframe which is currently on the server. So what you're saying is that I replace my (complicated) call to superfish in my head with the simple one like you listed, and it should do the trick? I'll try that in any case. Thanks Ettiene On Oct 3, 1:54 pm, Joel Birch [EMAIL PROTECTED] wrote: Hello Ettiene, There is now a much simpler and less buggy way of using bgIframe. It is described on the updated Superfish documentation page, here:http://users.tpg.com.au/j_birch/plugins/superfish/#sample2 You will need to make sure you are using the most up-to-date version of bgIframe which you can get here:http://brandonaaron.net/jquery/plugins/bgiframe/docs/#where_can_i_get_it The improved code for applying bgIframe to Superfish is this: $(document).ready(function(){ $(ul.sf-menu).superfish().find('ul').bgIframe({opacity:false}); }); Much simpler than the older method that you are currently using. Joel Birch.
[jQuery] Re: ext js-like dropdown box in jQuery?
Thanks Adam and Glen, I've implemented the jNice plugin and tweaked it a bit. It's working for me now :) Thanks again for the help. Ettiene On Jun 11, 2:52 am, Glen Lipka [EMAIL PROTECTED] wrote: Maybe this one?http://jquery.bassistance.de/autocomplete/demo/ Glen On Tue, Jun 10, 2008 at 5:04 PM, Adam Weis [EMAIL PROTECTED] wrote: Have you seen the jNice plugin? http://www.whitespace-creative.com/jquery/jNice/ -Adam On Tue, Jun 10, 2008 at 5:05 PM, Ettiene [EMAIL PROTECTED] wrote: Hi guys, I'm looking for a cool alternative to the normal HTML select dropdown box. Preferrably some javascript code that will take the existing HTML select code and generate a dropdown widget or something. A necessary feature that I'm also looking at is that the dropdown container displaying the options should be able to be wider than the element/widget itself and should render this way in all major browsers. I've tried this with a normal select element and CSS, but only got the desired results in FF. I've almost got it working in EXT JS using their combobox object, but I'm still having issues with displaying default Select one... text. Here is an image of what I've got so far - http://www.w3sandbox.com/ie7_combo.jpg Is this possible in jQuery? I've tried to find some solution, but without luck so far. Thanks ettiene
[jQuery] [tooltip] IE6 not using CSS classes depending on position.
Hi there, This tooltip works great, but when I even view the demo page ( http://jquery.bassistance.de/tooltip/demo/ ) in IE6, and look at the fancy / pretty tooltips, the one at the right hand side of the screen doesn't display the correct image background. Also if I scroll the page so that the tooltips are almost at the bottom of the page, and the image backgrounds need to pop up above the cursor position, the image background is also wrong. (This last one is a problem in all browsers I think). And I'm referring to the image that looks like a speech bubble. Can anyone help me out please? Thanks Ettiene
[jQuery] ext js-like dropdown box in jQuery?
Hi guys, I'm looking for a cool alternative to the normal HTML select dropdown box. Preferrably some javascript code that will take the existing HTML select code and generate a dropdown widget or something. A necessary feature that I'm also looking at is that the dropdown container displaying the options should be able to be wider than the element/widget itself and should render this way in all major browsers. I've tried this with a normal select element and CSS, but only got the desired results in FF. I've almost got it working in EXT JS using their combobox object, but I'm still having issues with displaying default Select one... text. Here is an image of what I've got so far - http://www.w3sandbox.com/ie7_combo.jpg Is this possible in jQuery? I've tried to find some solution, but without luck so far. Thanks ettiene
[jQuery] customizing superfish ?
Hi guys, I'm new to jquery and have just implemented superfish on a website I'm busy working on. But my manager wants some customization done with regards to positioning of the submenu's (i.e. where they fly out from). I also installed the supposition plugin that helps a bit with the positioning based on your window size. Basically just wanted to know if anybody can help me. I can send the URL's to the pages in private discussions. Also which tools do you guys use to debug, edit, create cool javascripts like this.? Thanks Ettiene