I'm trying to create a multi-field in-place editing: basically I have a series of values that I'd like to display as a text but when I click a specific button those texts have to become text-fields.
I'm trying to create a simple "page slider" using resizable. Basically I have 2 elements: 'left column' and 'right column'; 'left column' is resizable (only horizontally) and I'd like 'right column' grows and shrinks according to 'left column' size in order to keep the same overall width.
Hello guys, I'm using tabSwitch (www.hieu.co.uk/blog/index.php/tabswitch/) and I need to set the panel height dynamically (according to the div 'page_container' height) so I tried var page_height = $('#page_container').height(); $('.panel').tabSwitch('create', {type: 'slide', loopback: 1, height: page_height, width: 575, speed: 100 }); but looks like it doesn't work: the panel arrives until the end of the page (instead having the same height of 'page_container'. However if I fix the height everything works fine but it is not what I need $('.panel').tabSwitch('create', {type: 'slide', loopback: 1, height: 200, width: 575, speed: 100 }); Is there a way to dynamically set the height? Am I missing something? THANKS Sig
Hello guys, in a page I'm working on I have room for a div height not more than 200px, however I need to fit in a text that requires 300px and I don't want to show the scroll-bar on the right side so I'm looking for some ways/plug-ins in order to scroll the text within the div. I'd like to be able to scroll down, to scroll up and to stop the scrolling. Any suggestions about? Thanks and have a nice weekend. Sig
Hello guys, Is there a way to stop a carousel (created with jcarosellite 1.0.1) when it has ben set up with auto-scrolling? I need to be able to stop it and restart it when a button is pressed. If I can't can you please suggest me a plugin that have infinite scrolling, auto-scrolling and I can stop/restart? Thanks and have a nice day. Sig
Hello guys, I have hard time trying to create a custom parser for tablesorter. Basically I have a table with a list of projects, each project has a status (an integer 1 to 7) but in the table itself I want to display the status meaning (1=submitted, 2=approved and so on ...) so I'm trying to create a custom parser that order to project by status (1-
I know this is not strictly related to jquery but I don't know how to make it works. I'm working on a function that has as variable an array and for each element I need to create a piece of code for an other function. For instance when the array contains [0,1,2] I need to call $(this).tablesorter({headers: {0: { sorter: false }, 1: { sorter: false }, 2: { sorter: false }}}); and when the array contains [0,4,5,8] I need to call $(this).tablesorter({headers: {0: { sorter: false }, 4: { sorter: false }, 5: { sorter: false }, 8: { sorter: false }}}); How can I achieve so? THANKS, I appreciate your help Sig
Hi there, I'm trying to use scrollTo in oder to scroll vertically a div. I want to use 2 anchors, one to go up and the other to go down and I need that the effect works ONLY when the mouse is over the anchor (when I move it out the animation has to stop). How can I achieve so? For instance the code below scrolls correctly down but it doesn't stop until the end even if I move out the mouse. $('#down_button').mouseover(function(){ $('#text').scrollTo('100%', {axis:'y', duration: 5000}); }).mouseout(function(){ }); THANKS Sig
Hello guys, I have hard time to use tablesorter 2.0 with a javascript div update. I have tried it in several ways (using default Rails rjs file or all jquery call) but the result is the same: I get parsers[i] is undefined. Here what i would like to achieve: I have a list of states (California, Florida, Texas ...) and when I click one of them I would like to display in a div a table with the projects located in that state. So I fetch the projects in my controller and I update the div content, after that I call tablesorter initializer. Below you may find 2 of the solutions I tried 1 - call within the rjs file page.replace_html :detail, :partial => "list", :locals => { :projects => @projects } page<<"jQuery('.p_table').tablesorter({ sortList: [[0,0]] }); " 2- call within the view (complete) link_to_remote state, :url => display_projects_path(:state => state), :method => :get, :complete => "jQuery('.p_table').tablesorter({ headers: { 0: { sorter: false }, 1: {sorter: true }, 2: { sorter: true }, 3: { sorter: true }, 4: { sorter: true }, 5: { sorter: true }}});" Any ideas why I get the parsers error? THANKS and have a nice day Sig
Hello guys, is there a way to catch when a div content is updated through javascript? I update a div content through rjs and I need to call tablesorter every time the div is updated. Thanks and have a nice weekend. Sig
Hello guys, is there a way to select elements that match a regular expression? I have a set of divs with id = "wrap_n" where n is a progressive and I need to select them and for each 1 I have to add a function that togggle the "elem_n" div. Thanks Sig
Hello guys, I'd like to know if there is a way to keep a table header fixed on top of a div while I scroll the table rows. I have a div high 200px and the table itself is around 300px so when I scroll down I'd like to always see the header on top. I already use for the table tablesorter so the solution must be compatible with that plug-in. Thanks and have a nice day! Sig
Hello guys, I have a series of divs (all with the same CSS class) and I'm trying to add dynamically a background image to each one (each div needs a different image) so here my code $('.panel').css({'background-image' : 'url(../images/sub/'+ $ (this).attr("id") +'.png)'}); but unfortunately my divs don't have any background; however if I hardcode a image, for instance $('.panel').css({'background-image' : 'url(../images/sub/bg1.png)'}); every div has the (same) background. Finally if I print out the image path for each div $('.panel').each(function(){ alert('url(../images/sub/'+ $(this).attr("id") +'.png)'}); }); the path looks fine. Am I missing something??? THANKS Sig
Hello guys, is there a way (using a specific plugin or doing some hacking) to change the page URL when I change the viewed panel within a slider? Right now I'm using tabSwitch (http://www.hieu.co.uk/blog/index.php/ tabswitch/) but I can change it if a plugin lets me do that. Thanks and have a nice day. Sig
Hello guys, I'm trying to create a couple of "download" buttons (one placed at the left and the other at the right of my page) with sliding effect: basically I want to show just a piece of it and when the mouse goes over to slide it in order to show if the linked document is available or not. I have successfully implemented the effect I want for the right button as described below: #HTML <div class="download_badge" style="float: right;"><img src= "badge_whitepaper.png"></div> #CSS .download_badge { width: 209px; height:79px; overflow: hidden; } #JS $(document).ready(function(){ $('.download_badge').hover(function() { $(this).animate({ width: "273px"}); }, function() { $(this).animate({ width: "209px"}); $(this).addClass("download_badge"); } ); } you can see the final result here: http://www.vimeo.com/5891973 Now my question: how can I achieve the same effect for the left button? On left side I need to show the right part of the image and animate it when the mouse is over but how can I do that? Thanks Sig
Hello guys, I'm trying to update a script I found out there in order to fit better my needs. The first step I want to update is the capability to bind a dynamic number of anchors. Right now with the HTML below <ul id="product_links"> <li class="first" ><a>FIRST></a></li> <li class="second">SECOND</a></li> <li class="third"><a>THIRD</a></li> </ul> I have the script below: $("#product_links .first a ").bind("click", function(){ pupup_element ("first"); }); $("#product_links .second a ").bind("click", function(){ pupup_element ("second");}); $("#product_links .third a ").bind("click", function(){ pupup_element ("third");}); It works fine but since the number of anchors changes dynamically (through RoR) I'd like to have just 1 line that binds all the anchors. So here 2 questions for you: - how can I select an element's parent? - Does the code below work? $("#product_links a ").bind("click", function(){ pupup_elemet ("this.PARENT.id");}); basically I want to bind all the anchors within the product_links list to popup_element function that takes as a parameter the ID of the anchor parent. In my case the id of the list item. Thanks and have a nice weekend. Sig
Hello guys, I have a long list or product names and in order to speed up the research I'd like to have the alphabet letters on one side and when the user presses one of them the list scrolls to the first name that starts with that letter. Something like contacts on iPhone. So, before starting to develop it, does anyone knows a plugin that does that? Thanks and have a nice day Sig
Hello guys, I have found a script that works fine for me but I'd like to make it reusable but I have an issue with that. On the script I have something like function my_function() { var $container = $('#panel .container'); ... } and I'd like to pass the id (panel in this case) as a parameter like in the example below: function my_function(panel_id) { var $container = $('#--- .container'); ... } How can I achieve my goal? Thanks and have a nice day. Sig
Hello all, I create dynamically some drop-down menus, all of them have an id = "drop_N" where N is a progressive. So If I have 3 (this number can change at every request) menus their ids are "drop_1", "drop_2", and "drop_3" Is there a way to monitor all of them with a single function? I mean something like $("#drop_ ...").change(function () { ... }) Can I use a regular expression? If so How? Thanks for your help and have a nice day.
Hello all, I have a form with some checkboxes and I would like to submit it (through jquery) only if at least 1 checkbox is checked, otherwise I want to display an alert message. How can I get the number of checked boxes? I tried $("INPUT[type='checkbox']").is(':checked') but looks like it doesn't work. Any ideas about how I can achieve so? Thanks and have a nice day! Sig
Hi all, I'm submitting a form when the value of a drop-down menu changes. After that I would like to remove the focus from the field itself. I have tried different things: blur, focus=remove and so on but no one works. How can I remove the focus for a field? Thanks and have a nice day! Sig
Hi guys, I'm working on a Rails app connected to a legacy database. Since the reading process from the database takes several seconds (up to ten) I would like to display a loading message while the page is loading. Can I achieve that using jQuery? If so how? Thanks and have a nice day. Sig