Search Results

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

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

  • Starting out with vote_fu

    - by zizee
    Hi All, Trying my luck with the vote_fu rails plugin. The functionality looks like exactly what I need for a project of mine, but I have hit a roadblock. I have followed the github readme to the letter, installing it as a plugin. I have put acts_as_voteable on my "Event" model and acts_as_voter on my User model. In the console, when I try: >> event.votes or >> user.votes it successfully returns an empty array. but when I try to do the following: user.vote_for(event) I get "NoMethodError: undefined method `user_id' for #<Vote:0x7f5ed4355540>" Any ideas? I'm probably just missing something obvious, but maybe something is missing from the plugin's readme. Thanks.

    Read the article

  • formatting sourcecode using jQuery

    - by Sorskoot
    Does anyone know if there's a jQuery plugin to format code, XML or HTML? I'm showing the user some code on an html page. I used google prettify to make the code look pretty, but would like some indentation and linebreaks too. any suggestions?

    Read the article

  • jquery change function into code for plugin

    - by jaap Klevering
    Help would be greatly appreciated. What is the correct markup that would change this function into a plugin. I tried, but cant make it to work. $(document).ready(function(){ $('ul.tabNav a').click(function() { var curChildIndex = $(this).parent().prevAll().length + 1; $(this).parent().parent().children('.current').removeClass('current'); $(this).parent().addClass('current'); $(this).parent().parent().next('.tabContainer').children('.current').slideUp('fast',function() { $(this).removeClass('current'); $(this).parent().children('div:nth-child('+curChildIndex+')').slideDown('normal',function() { $(this).addClass('current'); }); }); return true; }); });

    Read the article

  • jQuery - Creating a dynamic content loader using $.get()

    - by Kenny Bones
    Hello everybody! (hello dr.Nick) :) So I posted a question yesterday about a content loader plugin for jQuery I thought I'd use, but didn't get it to work. http://stackoverflow.com/questions/2469291/jquery-could-use-a-little-help-with-a-content-loader Although it works now, I see some disadvantages to it. It requires heaploads of files where the content is in. Since the code essentially picks up the url in the href link and searches that file for a div called #content What I would really like to do is to collect all of these files into a single file and give each div/container it's unique ID and just pick up the content from those. So i won't need so many separate files laying around. Nick Craver thought I should use $.get()instead since it's got a descent callback. But I'm not that strong in js at all.. And I don't even know what this means. I'm basically used to Visual Basic and passing of arguments, storing in txt files etc. Which is really not suitable for this purpose. So what's the "normal" way of doing things like this? I'm pretty sure I'm not the only one who's thought of this right? I basically want to get content from a single php file that contains alot of divs with unique IDs. And without much hassle, fade out the existing content in my main page, pick up the contents from the other file and fade it into my main page.

    Read the article

  • jQuery Form plugin - no data from file upload?

    - by pojo
    I've been struggling a bit with the jQuery Form plugin. I want to create a file upload form that posts the data (JSON, from the chosen file) into a REST service exposed by a servlet. The URL for the POST is calculated from what the user chooses in a SELECT dropdown. When the upload is complete, I want to notify the user immediately, AJAX-style. The problem is that the POST header has a Content-Length of 0 and contains no data. I would appreciate any help! <html> <head> <script type="text/javascript" src="js/jquery-1.4.2.min.js">/* ppp */</script> <script type="text/javascript" src="js/jquery.form.js">/* ppp */</script> <script type="text/javascript"> function cb_beforesubmit (arr, $form, options) { // This should override the form's action attribute options.url = "/rest/services/" + $('#selectedaction')[0].value; return true; } function cb_success (rt, st, xhr, wf) { $('#response').html(rt + '<br>' + st + '<br>' + xhr); } $(document).ready(function () { var options = { beforeSubmit: cb_beforesubmit, success: cb_success, dataType: 'json', contentType: 'application/json', method: 'POST', }; $('#myform').ajaxForm(options); $.getJSON('/rest/services', function (data, ts) { for (var property in data) { if (typeof property == 'string') { $('#selectedaction').append('<option>' + property + '</option>'); } } }); }); </script> </head> <body> <form id="myform" action="/rest/services/foo1" method="POST" enctype="multipart/form-data"> <!-- The form does not seem to submit at all if I don't set action to a default value? !--> <select id="selectedaction"> <script type="text/javascript"> </script> </select> <input type="file" value="Choose"/> <input type="submit" value="Submit" /> </form> <div id="response"> </div> </body> </html>

    Read the article

  • jQuery ajax form submit - how to ensure dynamically loaded form's action is used

    - by kenny99
    Hi, i'm having a problem with dynamically loaded forms - instead of using the action attribute of the newly loaded form, my jquery code is still using the action attribute of the first form loaded. I have the following code: //generic ajax form handler - calls next page load on success $('input.next:not(#eligibility)').live("click", function(){ $(".form_container form").validationEngine({ ajaxSubmit: true, ajaxSubmitFile: $(this).attr('action'), success : function() { var url = $('input.next').attr('rel'); ajaxFormStage(url); }, failure : function() { } }); }); But when the next form is loaded, the above code does not pick up the new action attribute. I have tried adding the above code to my callback on successful ajax load (shown below), but this doesn't make any difference. Can anyone help? Many thanks function ajaxFormStage(url) { var $data = $('#main_body #content'); $.validationEngine.closePrompt('body'); //close any validation messages $data.fadeOut('fast', function(){ $data.load(url, function(){ $data.animate({ opacity: 'show' }, 'fast'); '); //generic ajax form handler - calls next page load on success $('input.next:not(#eligibility)').live("click", function(){ $(".form_container form").validationEngine({ ajaxSubmit: true, ajaxSubmitFile: $(this).attr('action'), success : function() { var url = $('input.next').attr('rel'); ajaxFormStage(url); }, failure : function() { } }); }); }); });

    Read the article

  • Zazzle.com Image Zoom effect using jQuery

    - by mikemick
    Is there a jQuery plugin that mimics the Zazzle.com photo zoom effect (you can view the effect here: http://www.zazzle.com/awards+tshirts). The closest I've found is the jQZoom plugin which opens the larger image in a separate container, instead of overlaying within the same container. I figured I'd ask, before I started building away on this...

    Read the article

  • Jquery validation, step by step validate on click function.

    - by Alex
    Trying to get jquery validation plugin work with my step by step form and here is the function i made. It works but only with first step. Any other step or final submit wont work in that case. If anyone could have a look whats wrong with my code i would appreciate the most. Thank you. function StepByStep(){ var a = { rules: { fieldname1: "required", fieldname2: "required", } } var b = { rules: { fieldname3:"required" } } var aStep = $("form").validate(a); var bStep = $("form").validate(b); $('input.nextStep').click(function(){ if (aStep.form()) { //open step 2 function } return false }); $('input.submit').click(function(){ if (bStep.form()) { $('form').submit(); } return false }); }

    Read the article

  • Loading jQuery plugin defaults from the server (AJAX)

    - by Pablo
    Im working on a private jQuery plugin in the following format: (function( $ ){ var defaults = {}; $.fn.cmFlex = function(opts) { this.each(function() { //Element specific options var o = $.extend({}, defaults, opts); //Code here }); //code Here }; })( jQuery ); How will i go on loading the default options from the server before $.cmFlex() is first called?

    Read the article

  • Silverlight penetration rate

    - by sthg
    Duplicate of: Silverlight Install Base - How big is it? Hi, Anyone knows the penetration rate (in %) for all North-American internet users with the Silverlight plugin installed? Been looking all around, but couldn't find any comprehensive numbers. I'm looking for General Public penetration rates, not only within the dev community. Something close to Adobe's flash version penetration stats would be great.

    Read the article

  • loopedSlider jQuery plugin problem

    - by kil4
    Hi i use loopedSlider link text and there is html source. <div id="loopedSlider"> <div class="container"> <div class="slides"> <div><img src="01.jpg" alt="" /></div> <div><img src="02.jpg" alt="" /></div> <div><img src="03.jpg" alt="" /></div> <div><img src="04.jpg" alt="" /></div> </div></div><a href="#" class="previous">previous</a> <a href="#" class="next">next</a><ul class="pagination"> <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> Is there possible to insert div like this: <div class="slides"> <div> <div class="newdiv">Some text</div> </div> </div> If i insert this div "newdiv" inside is not showing? Any solution ?

    Read the article

  • gMaps suddenly stopped working : Can't find variable: G_NORMAL_MAP

    - by Luca
    hello! i inject a map on my div called "concessionario-map" with GMap, a jquery plugin. Gmap everything works fine until this morning. now the debugger says: ReferenceError: Can't find variable: G_NORMAL_MAP i just search on google and i read some similar situation, but i dont find a case like mine. please, can you help me? thanks a lot in advance :) (full code) $.getJSON("http://maps.google.com/maps/geo?q="+loc+"&key=ABQIAAAAgDXoBEgIn38xaRBBqo6ygxTDjF32IQ1zA0BVcGSuGouGRvo0kRRKiyipbCniJWSso2scatdz36K-Mg&sensor=false&output=json&callback=?",function(data, textStatus) { long = data.Placemark[0].Point.coordinates[0]; lat = data.Placemark[0].Point.coordinates[1]; console.log(data); $('#concessionario-map').gMap( { scrollwheel: false, latitude: lat, longitude: long, zoom: 15, markers: [{ latitude: lat, longitude: long }], icon: { image: "files/images/gmap_pin_orange.png", shadow: "files/images/gmap_pin_orange_shadow.png", iconsize: [26, 46], shadowsize: [28, 48], iconanchor: [12,46], infowindowanchor: [12, 0] } }) });

    Read the article

  • acts-as-taggable-on: find tags with name LIKE, sort by tag_counts?

    - by James
    Hi I'm using the rails plugin acts-as-taggable-onand I'm trying to find the top 5 most used tags whose names match and partially match a given query. When I do User.skill_counts.order('count DESC').limit(5).where('name LIKE ?', params[:query]) This return the following error: ActiveRecord::StatementInvalid: SQLite3::SQLException: ambiguous column name: name: SELECT tags.*, COUNT(*) AS count FROM "tags" INNER JOIN users ON users.id = taggings.taggable_id LEFT OUTER JOIN taggings ON tags.id = taggings.tag_id AND taggings.context = 'skills' WHERE (taggings.taggable_type = 'User') AND (taggings.taggable_id IN(SELECT users.id FROM "users")) AND (name LIKE 'asd') GROUP BY tags.id, tags.name HAVING COUNT(*) > 0 ORDER BY count DESC LIMIT 5 But when I do User.skill_counts.first.name this returns "alliteration" I'd appreciate any help on this matter.

    Read the article

  • jQuery Validation plugin: prompt for override

    - by Sam Carleton
    I have a jQuery form that has validation of a sort. It is a data entry screen with two 'recommend ranges', one is 36-84, the other 50-300. The business rules call for the values to be either blank or greater than zero, but to prompt for confirmation if the values are outside of the range listed above. I have seen some other threads that talk about setting the class="cancel" on the submit button. From what I can tell, this will simply disable the validation. I need to prompt for a "do you want to continue, yes or no?" and if no stop the submit, if yes, continue. Below is an example from the book Pro jQuery. By default the top row needs to be between 10 and 20 to submit. How would you change it so that it prompts you and if you say Yes it submits, no prevents the submit: <!DOCTYPE html> <html> <head> <title>Example</title> <script src="jquery-1.7.js" type="text/javascript"></script> <script src="jquery.tmpl.js" type="text/javascript"></script> <script src="jquery.validate.js" type="text/javascript"></script> <style type="text/css"> h1 { min-width: 70px; border: thick double black; margin-left: auto; margin-right: auto; text-align: center; font-size: x-large; padding: .5em; color: darkgreen; background-image: url("border.png"); background-size: contain; margin-top: 0; } .dtable {display: table;} .drow {display: table-row;} .dcell {display: table-cell; padding: 10px;} .dcell > * {vertical-align: middle} input {width: 2em; text-align: right; border: thin solid black; padding: 2px;} label {width: 5em; padding-left: .5em; display: inline-block;} #buttonDiv {text-align: center;} #oblock {display: block; margin-left: auto; margin-right: auto; min-width: 700px; } div.errorMsg {color: red} .invalidElem {border: medium solid red} </style> <script type="text/javascript"> $(document).ready(function() { var data = [ { name: "Astor", product: "astor", stocklevel: "10", price: "2.99"}, { name: "Daffodil", product: "daffodil", stocklevel: "12", price: "1.99"}, { name: "Rose", product: "rose", stocklevel: "2", price: "4.99"}, { name: "Peony", product: "peony", stocklevel: "0", price: "1.50"}, { name: "Primula", product: "primula", stocklevel: "1", price: "3.12"}, { name: "Snowdrop", product: "snowdrop", stocklevel: "15", price: "0.99"}, ]; var templResult = $('#flowerTmpl').tmpl(data); templResult.slice(0, 3).appendTo('#row1'); templResult.slice(3).appendTo("#row2"); $('form').validate({ highlight: function(element, errorClass) { $(element).add($(element).parent()).addClass("invalidElem"); }, unhighlight: function(element, errorClass) { $(element).add($(element).parent()).removeClass("invalidElem"); }, errorElement: "div", errorClass: "errorMsg" }); $.validator.addClassRules({ flowerValidation: { required: true, min: 0, max: 100, digits: true, } }) $('#row1 input').each(function(index, elem) { $(elem).rules("add", { min: 10, max: 20 }) }); $('input').addClass("flowerValidation").change(function(e) { $('form').validate().element($(e.target)); }); }); </script> <script id="flowerTmpl" type="text/x-jquery-tmpl"> <div class="dcell"> <img src="${product}.png"/> <label for="${product}">${name}: </label> <input name="${product}" value="0" required /> </div> </script> </head> <body> <h1>Jacqui's Flower Shop</h1> <form method="post" action="http://node.jacquisflowershop.com/order"> <div id="oblock"> <div class="dtable"> <div id="row1" class="drow"> </div> <div id="row2"class="drow"> </div> </div> </div> <div id="buttonDiv"><button type="submit">Place Order</button></div> </form> </body> </html>

    Read the article

  • Jmeter- HTTP Cache Manager, Unable to cache everything what it is being cached by Browser

    - by chinmay brahma
    I used HTTP Chache Manager to Cache files which are being cached in browser. I am successful of doing it for some of the pages. Number of files being cached in Jmeter is equal to Number of files being cached by browser. But in some cases : I found number files being cached is lesser than the files being cached by browser. Using Jmeter I found only 5 files are being cached but in real browser 12 files are getting cached. Thanks in advance

    Read the article

  • qTip pop ups come in from top left of screen (on first load)

    - by franko75
    Hi, not sure if i'm set things up incorrectly - I don't seem to see anyone else with this problem, but my qTip popups (all ajax loaded content) are loading quite erratically, in that they are often animating in from off screen before appearing in the correct position. Is there a simple solution to this which I may have missed? Thanks again for your help. HTML markup: <span class="formInfo"> <a href="http://localhost/httpdocs/index.php/help/kc_dob" class="jTip" name="" id="dob_help">?</a> </span> qTip initialisation.. //set up for qtip function initQtip() { $('a.jTip').each(function() { $(this).qtip( { content: { // Set the text to an image HTML string with the correct src URL to the loading image you want to use text: '<img src="/media/images/wait.gif" alt="Loading..." />', url: $(this).attr('href') // Use the rel attribute of each element for the url to load }, position: { adjust: { screen: true // Keep the tooltip on-screen at all times } }, show: { when: 'click', solo: true // Only show one tooltip at a time }, hide: 'unfocus', style: { tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner border: { width: 10, radius: 10 }, width: { min: 200, max: 500 }, name: 'light' // Use the default light style } }); //prevent default event on click }).bind('click', function(event){ event.preventDefault(); return false; }); }

    Read the article

  • Use JS to add characters into textfield

    - by Thomas
    I want to add a $ symbol before a users entry into a text field without actually submitting the $ when the user clicks submit. Additionally, I need to prohibit the user from entering anything but numerical values in to the text input. I know about the JQuery input mask (http://www.conetrees.com/2009/03/blog/jquery-masked-input-plugin-increase-usability-for-masked-format-input-fields) but this plugin requires you to set the exact number of digits/letters that the user is supposed to enter, which is no good for my current project. Can anyone think of a way to accomplish what I have described above?

    Read the article

  • Why do hoverClass and activeClass properties won't work together ?

    - by Dumb Questioner
    Why do hoverClass and activeClass properties not work together in the following example ? <html> <head> <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.4.2.js"></script> <script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/tags/1.8rc1/ui/jquery-ui.js"></script> <style type="text/css"> .draggable {width:100px; height:100px; padding-bottom:5px; background-color:#dddddd;} #dropBox {width:556px; height:400px; } .sameStylePrecedenceAsDropHoverAndActive {background-color:#ff4490;} .drop-hover {background-color: #ff8040; } .drop-active {background-color: #ffffff; } </style> <script type="text/javascript"> $(document).ready(function() { $('.draggable').draggable({ helper: 'clone' }); $('#dropBox').droppable({ accept: '.draggable', activeClass: 'drop-active', hoverClass: 'drop-hover', drop: function(event, ui) { alert("Dropped!"); } }); }); </script> </head> <body> <div id="dropBox" class="sameStylePrecedenceAsDropHoverAndActive"></div> <div class="draggable">asd</div> </body> </html>

    Read the article

  • Expression builder in Javascript or jQuery?

    - by morpheous
    I am searching for an expression builder GUI (like the one used in Microsoft Access). It can be plain Javascript or JQuery plugin. I am loathe to build my own and reinvent the wheel if one already exists - and yet, a search on Google does not find anything remotely useful. Is anyone aware of any such library/plugin or article that covers this?

    Read the article

  • 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

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