Search Results

Search found 7677 results on 308 pages for 'wordpress shopping cart plugins'.

Page 123/308 | < Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >

  • How can I make a Jeditable (jQuery) span activate editing on more than one event?

    - by JonathanHayward
    For the jQuery extension Jeditable, one of the parameters that can be specified is which DOM event will turn a div/span/... into a text input/textarea/... I would like to have more than one event serve as a trigger; that is, I would like either a click event or a contextmenu event to turn a span into an in-place edit area. Is there a graceful way to do this without forking Jeditable? --edit-- An example of code specifying the event is below. The parameter is optional, defaulting to a regular click. $(".edit_rightclick").editable("/ajax/save", { cancel: "Cancel", submit: "OK", tooltip: "Right click to edit.", event: "contextmenu", }); Calling twice, once for the regular click event with the event unspecified, and one for the contextmenu event (right-click if there are no switched mouse buttons or anything like that) does not seem to produce the intended effect of an element becoming editable in place on a click from either mouse button.

    Read the article

  • Calling a jQuery method at declaration time, and then onEvent

    - by cesarsalazar
    I've been writing JS (mainly jQuery) for quite a few months now, but today I decided to make my first abstraction as a jQuery method. I already have working code but I feel/know that I'm not doing it the right way, so I come here for some enlightenment. Note: Please do not reply that there's already something out there that does the trick as I already know that. My interest in this matter is rather educational. What my code is intended to do (and does): Limit the characters of a textfield and change the color of the counter when the user is approaching the end. And here's what I have: $(function(){ $('#bio textarea').keyup(function(){ $(this).char_length_validation({ maxlength: 500, warning: 50, validationSelector: '#bio .note' }) }) $('#bio textarea').trigger('keyup'); }) jQuery.fn.char_length_validation = function(opts){ chars_left = opts.maxlength - this.val().length; if(chars_left >= 0){ $(opts.validationSelector + ' .value').text(chars_left); if(chars_left < opts.warning){ $(opts.validationSelector).addClass('invalid'); } else{ $(opts.validationSelector).removeClass('invalid'); } } else{ this.value = this.value.substring(0, opts.maxlength); } } In the HTML: <div id="bio"> <textarea>Some text</textarea> <p class="note> <span class="value">XX</span> <span> characters left</span> </p> </div> Particularly I feel really uncomfortable binding the event each on each keyup instead of binding once and calling a method later. Also, (and hence the title) I need to call the method initially (when the page renders) and then every time the user inputs a character. Thanks in advance for your time :)

    Read the article

  • Chain dynamically created dropdowns with JQuery

    - by ricardocasares
    I'm building some kind of indefinite filters for an app, and I'm havin this problem when I clone some selects. The things is this selects are chained between them, trough the Chained Selects jQuery plugin. The problem is that every time I clone the selects, the chaining stops working, and I've tryed everything, such as .live() to make it work, but it seems I'm out of luck :D Here you have a sample of what I'm talking about, http://jsfiddle.net/7K2Eu/63/ At first, the selects chain normally, but when I clone the form, they stop working, except for the first row of selects. Thank you!!

    Read the article

  • Customizing the Stars Image for Ajaxful_Rating RoR plugin

    - by Kevin
    I'm trying to come up with my own star image that's slightly smaller and different style than the one provided in the gem/plugin, but Ajaxful_rating doesn't have an easy way to do this. Here's what I've figured out so far: The stars.png in the public folder is three 25x25 pixel tiles stacked vertically, ordered empty star, normal star, and hover star. I'm assuming as long as you keep the above constraints, you should be fine without modifying any other files. But what if you want to change the image size of the stars to larger or smaller? I've found where you can change the height in the stylesheets/ajaxful_rating.css .ajaxful-rating{ position: relative; /*width: 125px; this is setted dynamically */ height: 25px; overflow: hidden; list-style: none; margin: 0; padding: 0; background-position: left top; } .ajaxful-rating li{ display: inline; } .ajaxful-rating a, .ajaxful-rating span, .ajaxful-rating .show-value{ position: absolute; top: 0; left: 0; text-indent: -1000em; height: 25px; line-height: 25px; outline: none; overflow: hidden; border: none; } You just need to change every place that says "25px" above to whatever height your new star image is. This works fine but doesn't display the horizontal part correctly. Anyone know where I would look to set the horizontal part as well? (I'm assuming it's in an .rb file somewhere based upon how many stars you specified in your ajaxful_rating setup)

    Read the article

  • .next is undefined, jquery plugin problem

    - by ndelangen
    I'm trying to create my own plugin. But I'm having trouble getting things right. It appears when I'm trying to traverse inside .each things go wrong. I'm trying to go to the next item every 6 seconds by fading. jQuery(function($){ $.fn.rotator = function(options){ this.each(function() { var container = $(this); var images = container.children(); //Set the opacity of all images to 0 images.css({opacity: 0.0}); //Get the first image and display it (gets set to full opacity) $('div:first',this).css({opacity: 1.0}).addClass('show'); //Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds var obj = $(this); setInterval(nextimage(obj),6000); }); }; // rotate function function nextimage(obj) { var container = $(obj); var images = container.children(); //Get the current image var current = (images.hasClass('show')? images.hasClass('show') : images.first()); //Get next image, when it reaches the end, rotate it back to the first image var next = ((current.next().length) ? ((current.next().hasClass('show')) ? images.first() :current.next()) : images.first()); //Set the fade in effect for the next image, the show class has higher z-index next.css({opacity: 0.0}) .addClass('show') .animate({opacity: 1.0}, 1000); //Hide the current image current.animate({opacity: 0.0}, 1000) .removeClass('show'); }; }); $(document).ready(function(){ $("#bg").rotator({ }) }); The error I get is: current.next is not a function Line 35 Line 35 = var next = ((current.next().length) ? ((current.next().hasClass('show')) ? images.first() :current.next()) : images.first()); Can someone tell me what I'm doing wrong?

    Read the article

  • Can Uploadify send e-mail on complete?

    - by David
    Uploadify is a jQuery/Flash plugin for uploading multiple files. It's working great, except I can't figure out how trigger e-mail when all files are complete. If I try to add something like <% SendEmail(); %> to the onAllComplete parameter, it just sends the e-mail when the page loads. Is there a way to do this within the handler recommended here or from this post? Or is there some way to trigger a post in the onAllComplete parameter?

    Read the article

  • jCarousel - achieving an active state AND wrap:circular

    - by swisstony
    Hey folks A while back I implemented the jCarousel image solution for a client that required a numbered active state. After a bit of googling a found the answer but noticed that the preferred circular option would not work. What would happen is that once the carousel had cycled through all its (5) images, upon the return to the first, the active state would be lost, because, according to jcarousel it was actually the 6th (the index just keeps on incrementing). I just went ahead and instead used wrap:'both' which at least had a correctly functioning active state. However now the client says they dont like this effect and simply want the animation to return to position 1 after the final image. This means I need to get'wrap: 'both' working somehow. Below is my current code. Can someone please solve this one, as its a little above my head! function highlight(carousel, obejctli,liindex,listate){ jQuery('.jcarousel-control a:nth-child('+ liindex +')').attr("class","active"); }; function removehighlight(carousel, obejctli,liindex,listate){ jQuery('.jcarousel-control a:nth-child('+ liindex +')').removeAttr("class","active"); }; jQuery('#mycarousel').jcarousel({ initCallback: mycarousel_initCallback, auto: 5, wrap: 'both', vertical: true, scroll: 1, buttonNextHTML: null, buttonPrevHTML: null, animation: 1000, itemVisibleInCallback: highlight, itemVisibleOutCallback: removehighlight }); }); Thanks in advance

    Read the article

  • Recommendation of Jquery Table pager plugin?

    - by chobo2
    Hi I was trying to use the pager plugin that comes with the tablesorter plugin but I can't get it to work as you can see from my previous post http://stackoverflow.com/questions/2836680/need-help-with-jquery-tablesorter-pager-plugin. I given up on this plugin as no one can seem to come up with a solution how to make it work and I kinda need to get this place soon. So now I am looking for a new one but it must have the following features. Work on tables Work on tables that have the tablesorter 2.0 plugin on it( so I don't want a pager plugin that comes with its own table sorter since I don't want to change that. It should be a standalone pager plugin). Be able to add rows dynamically to the table and some how update the pager so this row now becomes part of the pager. Thanks

    Read the article

  • Drupal : how to emulate the public/private attribute available in WordPress

    - by Parneix
    Hi, Basically, I'm looking for an easy way (module) to add a private/public option to any kind of content I may published in Drupal (blog entry, image, etc.). So that when I'm logged in, I can see everything. But when an anonymous user visit the site, he will only see the public stuff. It's way to manage a kind of front window/back-store architecture. I can use the same Drupal installation to all my needs and choose to filter the stuff I may want to make publicly available. * Important : 1) Private items must not be accessible even if anonymous users guess its URL; 2) Private item must not show up if anonymous user perform a search; 3) Private content must not be indexed by search engines; 4) Private items should show up if I perform a search while being logged in. Any idea? Thanks a lot, P.

    Read the article

  • jquery lightbox multiple items to look like mac dashboard

    - by Don
    Hope the title says it all... I'm wondering if it's possible in any existing lightbox to pop up a look similar to the mac dashboard where multiple divs could be "on" in the front with the main webpage with a gray overlay. Basically something where a user clicks an icon on the main webpage to call, and then 4 separate content boxes are popped on top, but not in a window like a gallery. I'm thinking the top background used could be set to transparent and the individual items could be divs on the popped area, but before I reinvent the wheel, I thought I'd see if there's something like this that I just haven't found in my searches. UPDATE: 1/7/2011 I ended up using colorbox with a background behind my divs. It doesn't look like the mac with items having the bg behind them showing between them, but after talking to the designer I'm working with, that wasn't something they really needed anyhow. I think it MAY be possible changing some of the CSS though for the bg of the "popped" window. Colorbox seems to be pretty nice about making it clear what the CSS is doing and there are multiple example skins. Just my $0.02...

    Read the article

  • jKey (JavaScript key shortcut plugin) Issue

    - by Oscar Godson
    Me and a friend are writing a plugin for jQuery that makes it easy for devs to add key shortcuts and we're damn close but no cigar. We're having issues with the key combos. It seems like we are having issues when you call the same selector multiple times on a page. Try pressing alt+a... youll see it works one time, then gets all mangled up. Anyone know how to fix it? It'll be on github after it's corrected and I'd be happy to add "thank you to" link to whoever can fix this in the header with the copyright info :) It's nicely documented and i have all the code and stuff here. So... anyone? http://jsbin.com/azaha4

    Read the article

  • jQuery: bind generated elements

    - by superUntitled
    Hello, thank you for taking time to look at this. I am trying to code my very first jQuery plugin and have run into my first problem. The plugin is called like this <div id="kneel"></div> <script type="text/javascript"> $("#kneel").zod(1, { }); </script> It takes the first option (integer), and returns html content that is dynamically generated by php. The content that is generated needs to be bound by a variety of functions (such as disabling form buttons and click events that return ajax data. The plugin looks like this (I have included the whole plugin in case that matters)... (function( $ ){ $.fn.zod = function(id, options ) { var settings = { 'next_button_text': 'Next', 'submit_button_text': 'Submit' }; return this.each(function() { if ( options ) { $.extend( settings, options ); } // variables var obj = $(this); /* these functions contain html elements that are generated by the get() function below */ // disable some buttons $('div.bario').children('.button').attr('disabled', true); // once an option is selected, enable the button $('input[type="radio"]').live('click', function(e) { $('div.bario').children('.button').attr('disabled', false); }) // when a button is clicked, return some data $('.button').bind('click', function(e) { e.preventDefault(); $.getJSON('/returnSomeData.php, function(data) { $('.text').html('<p>Hello: ' + data + '</p>'); }); // generate content, this is the content that needs binding... $.get('http://example.com/script.php?id='+id, function(data) { $(obj).html(data); }); }); }; })( jQuery ); The problem I am having is that the functions created to run on generated content are not binding to the generated content. How do I bind the content created by the get() function?

    Read the article

  • JQuery: Floating share box like Mashable?

    - by Prashant
    I am looking for a jQuery plugin which can serve me the floating share box functionality just like mashable implement in their new design: http://mashable.com/2010/03/12/flickr-co-founders-startup-hunch-raises-10-million/. On the page above in the left side mashable has sharing options which stays on the screen when you scroll the page. I want to implement same kind of functionality in my application, using a jQuery plugin.

    Read the article

  • Developing a jQuery plugin that returns a given object, instead of jQuery object itself!

    - by mehdi5275
    Hi, Consider the following base code: (function($) { $.fn.myPlugin = function(settings) { return this.each(function() { //whatever }); }; }); The plugin returns a jQuery object. The question is how am I supposed to write a plugin that returns a custom object so that I can do something like this: var api = $('div.myelement').myPlugin(); api.onMyEventName(function(e, whateverParam) { //whatever }); It'd be highly appreciated if you could write some lines of code that describes me how to do that, how to call the onMyEventName function on a custom api object... Thanks.

    Read the article

  • jQuery DataLink - Does DataLink solve my use case?

    - by AnApprentice
    Hello, I recently heard of the jQuery datalink plugin and wondered if I should be using if for the following: I have a an inbox in my app that consists of the following: Inbox (index) - List of Items (list of mails) Inbox (show) Item Viewer (1 mail) Inbox Unread Counter The challenge I'm having now is a user can mark a mail as read/unread in either view which makes keeping the counter accurate challenging. Can datalink help with this? If so how? Also, I read that datalink requires forms is that true? Or can I bind the links to anything like 0 and anytime a mailitem changes from read to unread it would automatically update? Thanks

    Read the article

  • jquery fancy box

    - by André Alçada Padez
    Hi, i'm using fancy box for some content editing in my backoffice. I recently added an image manager wich i create with javascript. It's kind of like a fancybox, but i had to do it from scractch for it to be able to overlay the first one. My problem is this: I want to have the user being able to press the escape key to close my manager, but if i use $(window).keypress when i press the esc key, both the boxes close. I have tried $(window).unbind('keypress') when i start loading my box, and i have tried to look through the fancybox js file, but it is minimized. Does anyone know how i can disable and afterwards enable the escape key (during runtime) on the fancybox? Thanx

    Read the article

  • How to make a self contained jQuery plugin that finds the tallest image height?

    - by Jannis
    I have been trying to make this to be a little jQuery plugin that I can reuse in the future without having to write the following into my actions.js file in full. This works when loaded in the same file where I set the height using my variable tallest. var tallest = null; $('.slideshow img').each(function(index) { if ($(this).height() >= tallest ) { tallest = $(this).height(); } }); $('.slideshow').height(tallest); This works and will cycle through all the items, then set the value of tallest to the greatest height found. The following however does not work: This would be the plugin, loaded from its own file (before the actions.js file that contains the parts using this): (function($){ $.fn.extend({ tallest: function() { var tallest = null; return this.each(function() { if ($(this).height() >= tallest ) { tallest = $(this).height(); } }); } }); })(jQuery); Once loaded I am trying to use it as follows: $('.slideshow img').tallest(); $('.slideshow').height(tallest); However the above two lines return an error of 'tallest is undefined'. How can I make this work? Any ideas would be appreciated. Thinking about this even more the perfect usage of this would be as follows: $('.container').height(tallest('.container item')); But I wouldn't even know where to begin to get this to work in the manner that you pass the object to be measured into the function by adding it into the brackets of the function name. Thanks for reading, Jannis

    Read the article

  • jQuery validation plugin for two fields

    - by jonathan p
    I am using the Jquery Validation plug-in, however i need to add a "custom rule", i have 2 date fields and i need to ensure that the end date is not less than the start date. My problem is how to pass the two fields in as elements. As i understand u set up a custom function something like this : function customValidationMethod(value, element, params){ } But can't see how i could use it with two fields, if anyone has any ideas it would be greatly appreciated.

    Read the article

  • typeof for html plugin elements

    - by gf
    When using ECMAScripts typeof on plugin elements (i.e. embed or object), Safari & FireFox return "function": typeof(window.document['myPlugin']) // "function" This can't be influenced on the plugin side, as the browser doesn't call the plugin here. Funny enough, in IE the same line evaluates to "object". Is that simply implementation dependent behaviour as per ECMAScript §11.4.3 or am i missing something here?

    Read the article

  • To be a lazy developer or not to be a lazy developer?

    - by JamesStuddart
    Am I a lazy developer? Is it being lazy to use automated tools, such as code generators and such? Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities. I also use Resharper and I would say it fights with MSDeploy as to which gets installed first after Visual Studio. Again if I had to, I could code without it, but prefer not to. Both these tools from my point of view are no brainers as they improve output massively. But is this lazy? I'm sure there are purists out there that would say everything should be wirtten by you so you know what everything is doing, but if you can read through the code and see what is happening is that ok? So am I being lazy or am I just using all the cards in my hand?

    Read the article

  • Plugin methods are missing in Firefox 3.6

    - by splintor
    Hi, We have a plugin that we use to enable printing and saving from our app. We instantiate it using tag with all needed attributes, and then call Save() or Print() method on the document.embeds[0] object. This used to work perfectly on Firefox 3.5 and earlier, but it no longer works in Firefox 3.6. In 3.6, document.embeds[0].Save is null, that is our custom methods are not defined on this object. Any idea why this happens, and what has changed in Firefox 3.6 that causes it? Any idea on how to debug it and find the cause? And most important, any idea of a workaround that will allow us to access this methods? Thanks, splintor

    Read the article

  • will_paginate without use of activerecord

    - by truthSeekr
    I apologize if this is a trivial question or my understanding of rails is weak. I have 2 actions in my controller, index and refine_data. index fetches and displays all the data from a database table. refine_data weeds out unwanted data using regex and returns a subset of the data. Controller looks like: def index Result.paginate :per_page => 5, :page => params[:page], :order => 'created_at DESC' end def refine_data results = Result.all new_results = get_subset(results) redirect_to :action => 'index' end I would like to redirect the refine_data action to the same view (index) with new_results. As new_results are not from the database table (or model), how do I go about constructing my paginate?

    Read the article

< Previous Page | 119 120 121 122 123 124 125 126 127 128 129 130  | Next Page >