JQuery :: Calculation Plugin - How To Use Live Function

Oct 20, 2009

I am currently working on a project where I am using the jQuery Calculation plugin [URL] to do some math functions in a dynamic form, the issue is that when a new set of fields is created the calculation script only pulls data from the ones there when the page loaded, I am fairly certain that what I need to do is use the live function, however I am not very familiar with it and still learning. My jQuery for the plugin is :
$("input[name^=emem]").sum("keyup", "#totalMem");

View 1 Replies


ADVERTISEMENT

Jquery :: Embed Calculation Plugin ?

Feb 14, 2009

I am facing following problem while trying to embed JQuery Calculation plugin.

Code:

Sum:

And following is JQuery Code:

And following is error, displayed in FireBug:

Code:

Note: Table Sorter plugin works fine and it seems problem in calculation plugin.

View 6 Replies View Related

JQuery :: Using Live() With A Plugin?

Oct 14, 2010

frist of all, im a newbe on jquery. i have a table where i can add new "<span>" and i can edit it with editInPlace plugin but i have a problem. when i load the web with those elements (<span>), i cant edit it after i add a new item, then, all the items are editable

[Code]...

View 1 Replies View Related

JQuery :: Can't Use .live To Re-initialise A Plugin When Dom Is Updated / Why Is So?

May 24, 2011

Here is a live view of the problem I have:As you can see I am building a page which has an image cycle/carousel. On each of the images I would like to also have a zoomable loupe - I am using the jQzoom plugin to achieve this. Hover over the first image and you will see the zoom appear.

However, whilst all works fine on the first image, as soon as I click the next arrow (just visible at present top left of image as CSS tweak needed) to load the second image and hover over for the zoom, the second zoomed image fails to load. Anyone know why?

I am presuming it's because the cycle plugin hides the images so the jqZoom plugin can't 'grab' them.

I've been reading up on .live() function - can I use this to solve the problem? If so, could you provide some pointers...?

View 2 Replies View Related

JQuery :: Live() Doesn't Trigger 'click' Event In Plugin

Jan 8, 2010

I've written the following plugin

Code:
(function($){
$.fn.myPlugin = function() {
this.each( function() {

[Code]....

I can see all the anchors within the each function, but when I click link nothings happens.

View 1 Replies View Related

JQuery :: Using AddClass Function With Live

Feb 19, 2011

I am trying to use the .live() jQuery function in cooperation with the .addClass() function, but I am unsure of how exactly to pass the parameter of the class-to-be-added's name through the live() function to work with addClass().Here is an example of the jQuery I would be using: [code]

I would like to use addClass() in both instances in the code above in cooperation with live() while being able to pass the class's name through the live() function. I've searched around the web quite a bit, but none of my searches have resulted in an answer that fits my specific needs.

View 2 Replies View Related

JQuery :: Using Hover With Live Function?

Apr 20, 2011

my jquery was intially was

$(document).ready(function () {
$('ul.nav li').hover(
function () {

[code]....

View 4 Replies View Related

JQuery :: Using Live On A Custom Function?

Jan 15, 2011

I have my own custom function:

function callFunction(param1, param2) {
}
this function is called when a user clicks on an image
onClick='callFunction(1,2);'
etc.

How do I apply live to callFunction? The image appears from an ajax call and as such the function doesn't recognise the call. I've used live on my other simple functions, but how would I use it on my custom function? The reason I am using the custom function is because I need to pass parameters to it.

View 1 Replies View Related

Simple Calculation - Error On Function Call

Aug 15, 2011

I have written the following javascript code which makes a simple calculation and writes between the <span> tags using Inner HTML

My code is:
Code:
<html><head>
<script type="text/javascript">
function hesapla() {
kredimiktari = document.hesapla.miktar.value
kredivadesi = document.hesapla.vade.value;
faiz = document.hesapla.faiz.value;
ayliktaksit1 = (kredimiktari * faiz) / kredivadesi;
geriodeme1 = kredimiktari * faiz;
document.getElementById('ayliktaksit').innerHTML = "<strong>Taksit / Ay :</strong>" + ayliktaksit1;
document.getElementById('geriodeme').innerHTML = "<strong>Taksit / Ay :</strong>" + geriodeme1;}
</script></head><body>
<form name="hesapla">

<input type="text" name="miktar" value="Kredi Miktarı" onfocus = "if (this.value == 'Kredi Miktarı') this.value = '';" onblur = "if (this.value == '') this.value = 'Kredi Miktarı';" />
<input type="text" name="vade" value="Kredi Vadesi" onfocus = "if (this.value == 'Kredi Vadesi') this.value = '';" onblur = "if (this.value == '') this.value = 'Kredi Vadesi';" />

<input type="text" name="faiz" value="Faiz Oranı" onfocus = "if (this.value == 'Faiz Oranı') this.value = '';" onblur = "if (this.value == '') this.value = 'Faiz Oranı';" />
<div id="gosterim"><span id="ayliktaksit"></span><span id="geriodeme"></span></div>
<input type='button' value='Hesapla' onClick='hesapla()'><br><br>
<img src="images/dot2.png" width="180" height="2" alt="dot"/>
</form></body></html>

I am really confused as similar code on Tizag web site works fine.
Code:
<script type="text/javascript">
function changeText(){
document.getElementById('boldStuff').innerHTML = 'Fred Flinstone';
}</script>
<p>Welcome to the site <b id='boldStuff'>dude</b> </p>
<input type='button' onclick='changeText()' value='Change Text'/>

View 2 Replies View Related

JQuery :: Live Function Is Not Working In Case?

Mar 21, 2011

I am very new to jquery live function & i stuck in to the problem. I am using live function to get the ajax response & appending to the div here is my code,

function add_master(module_url, response_target_id, custom_id) {
$('a.addclass').live('click', function() {alert('add');
$(response_target_id).fadeIn('fast');

[code]....

View 4 Replies View Related

JQuery :: Using 'live' And A Dynamic Function Call?

Oct 11, 2010

again I turn this forum as the issue I have is beyond my current knowledge and I have found it impossible to find help on through google.First up, I have some code that puts a keyup event on all text boxes that have a certain string in their ID. That code uses 'live' and looks like this.$("td[id*='tdQuantity'] .field_input ").live('keyup', function() { calculateTotal(); });This one is simple enough. All the input boxes that match that selector call 'calculateTotal()' on keyup. I have code that adds a new dynamic row of items. Hence my use of 'live' above'. However, once it hits calculateTotal() I have it hard coded items on the first row. For example..

if (isNaN($('#tbQuantity_1').val())) {
iQuantity = 1;
$('#tbQuantity_1').val('1');

[code]....

View 4 Replies View Related

JQuery :: Call A Plugin Function From A Html File In Which The Plugin Is Running

Aug 18, 2011

I have a slideshow plugin and there is a function in it called stopAutoplay(). This is called when I click on the pre-defined pause button in the slideshow, so it stops.

If I switch between the slideshows(Slideshow 1 2 3) the slideshow is getting messier and messier because it starts many slideshows at the same time and the plugin gets confused what to show.

I figured if I click on the pause button before I switch to another slideshow it works fine. Therefore what I would like to achieve now is to call stopAutoplay() somehow before I switch to the new slides.

How can I call stopAutoplay() from the html file when I click on one of the slideshow 1 2 3 buttons?

I've tried the codes in green below but they don't work.

fadeSlideShow(); plugin pause function part:
stopAutoplay = function(){
clearInterval(intval);
intval = false;

[Code]....

If there is a better solution let's say to kill everything before the new slideshow appears it's even better. Although I've tried die(), empty(), detach(), remove(). I hoped remove() would help cause as I read it's suppsed to remove everything but for some reasons it doesn't...

View 3 Replies View Related

JQuery :: Search Dynamic Control After Binding With Live Function?

May 5, 2011

I have to create a dynamic html block that can hide and show text, anchor tag is used to hide/show the block, which is also dynamically generated, so I have to call anchor's tag click event using live function, but within that click event I have to look up for immediate next div control which will hide/show. my code is somewhat like below I am comment the line of code which is not working

$("a").live("click", function(e) {
var $nextElement = $(this).next("div");//div control is not found here, it is also dynamically generated.
($(this).html() == "[-]") ? $(this).html("[+]") : $(this).html("[-]");

[Code].....

View 4 Replies View Related

JQuery :: Submit Function Not Always Trigger Live Or Bound Handler

Sep 25, 2010

I have this boiled down to the following code: [URL]. I have two text inputs in a form, and a keydown handler to catch the arrow keys. When the focus is lost on an input, it is supposed to call the submit handler on the form. When I use the tab key, it works as expected, and calls my submit handler. However, when I use the arrow keys, it submits the form and goes to the action url, not running the alert in my custom submit handler. It's as if it either loses the bound submit handler or it calls a new default one or something.

View 2 Replies View Related

JQuery :: Body Click Function Stops Other Live Functions From Working?

Oct 26, 2010

When thebody section below iscommented out, I get hello, and when it isn't, I don't !

$("body"
).click(function
(e){
return

[Code]....

Is this a bug, is it an unavoidable aspect of the "live" architecture

View 3 Replies View Related

JQuery :: Function Return - Pull Live Data From Database And Display It In An Alert Box On Sight

Oct 10, 2010

I'm very new to jQuery, only picked it up yesterday, so there is very little I understand at the moment. I have a website on which I would like to display a real time, time-series chart displaying results from a database that is constantly updated. how to pull live data from my database and display it in an alert box on my sight. One of the replies said I should use jquery to achieve this.

[Code]...

View 1 Replies View Related

JQuery :: Firebug Shows The Updated Class Of An Element But Live() Function Takes The Old Class?

Jul 2, 2009

I am new to this discussion but hope you would post reply for my query and encourage me to keep in touch with this discussion. Well here is my problem. I have made an edit in place form in which we can add and remove the elements. I have used jquery.jeditable.mini.js and jquery.duplicate-remove.js plugins for edit in place and add and remove action. I have live() function to access the dynamically ganerated elements like this. $(".addressDiv span").live("mouseover", function(){
clickable function here...

[Code]...

View 1 Replies View Related

JQuery :: Call A Plugin Function?

Jun 26, 2010

how can I call the functions CallMe1 and CallMe2? I am only able to call CallMe3()

------------------myplugin.js-------------------(function($) {
$.myplugin = function() {
function CallMe1() {
alert('Hello');

[Code].....

View 2 Replies View Related

JQuery :: Add A Callback Function To A Plugin?

Oct 5, 2009

How do I add a callback function to a plugin so that i can execute another function after the plugin completes its own processes.

View 2 Replies View Related

JQuery :: Triggering A Plugin From Within Function?

Sep 9, 2010

I'm playing with jQuery and I'm having a problem with this code; Problem: trigger a pluggin that gets called from .click(function(){};

[Code]...

View 2 Replies View Related

JQuery :: Looking For Price / Distance Calculation

May 6, 2010

I'm looking for a jquery tutorial which helps on calculating the distance between two points?

I've found a few javascript ones, but its breaking the rest of my jquery code!

does anyone know of anything? im using it to calculate a price for a specific distance traveled.

View 2 Replies View Related

JQuery :: Getting Plugin Within A JSON Callback Function?

Oct 8, 2010

I am using a json from a Google spreadsheet and a jquery plugin which is called throught this HTML line <ul id="example">.The thing is that when I dynamically append elements to the <ul id="example"> from within the JSON callback function, these are not recognized by the jquery plugin

Code:

<form>
<ul id="example">BLA BLA BLA</ul>
</form>

[code]....

If I insert an <ul id="example"> plus some <li> in the HTML code the plugin works perfect If I insert dynamically some <li> to the <ul id="example"> throught a javascrypt function before executing the callback (...json-in-script&callback=...) also work perfect.But when I insert dynamically the <li> elements within the callback function (in my case: cm_loadMapJSON) does not work well.

View 1 Replies View Related

JQuery :: Sharing A Click Between A Function And A Plugin?

Aug 25, 2011

Following on from my previous question about loading a div based on idI realised I might be overcomplicating it a bit - instead of loading I could instead just show a hidden div which has an id that matches the href of the link and hide all its siblings.I'm using the jmapping google maps plugin, which generates the links I'm using. The idea is you click on a location link and it's identified on the map but alsoa div containing further information appears.My code seems to have hijacked the click event from the jmapping plugin though - the div appears like I want it to, but now the map does nothing. There were no issues with firing both from the link when I used load but show doesn't seem to play as nicely.Is there a way to phrase it differently so that when I click a link both the jmapping plugin and my show code fire and not just one of them?

<script type="text/javascript">$(document).ready(function(){
$('#worldmap').jMapping({
default_zoom_level: 8,

[code]....

View 2 Replies View Related

JQuery :: Cycle Plugin StartingSlide Set By A Function Return?

Feb 13, 2011

i have a unusual cycle on my page and it loads slides from url and after arrange and sorted for slide all i need is startingSlide property to accept function return

like this

startingSlide:test();
function test(){
return 0;
}

i look into jquery cycle and it was accept that parameter using parseInt() parseInt() cannot show very well with function returns also like thisparseInt(test());got NaN

View 2 Replies View Related

JQuery :: Order Of Cycle Plugin's AddSlide Function?

Oct 20, 2009

I've been using the cycle plugin a lot lately (thanks a tonne,malsup!). I'm trying to write a wrapper plugin for the Cycle plugin that will allow me preload (more accurately, queue load) images for a banner slideshow. I've run into an issue with the cycle.addSlide function... it seems to be adding my slides out of order. Has anybody run into this before? what I'm trying to do: Each image is loaded individually, and once loaded they are added to the DOM via cycle.addSlide.

[Code]...

View 1 Replies View Related

JQuery :: Plugin - Function (Prototype) Test Unknown

Jan 8, 2010

I want to write a plugin, say 'myPlugin' which I can use like
Code:
$('#myID').myPlugin() ;
$('#myID').myPlugin.test() ;

The plugin I wrote looks like
Code:
(function($){
$.fn.myPlugin = function() {
// do something
} $.fn.myPlugin.test = function() {
var $this = $(this) ;
// do something ;
}})(jQuery) ;

This works and it doesn't work. It works because test() is called, but this is not the element with id '#myID' it is $.fn.myPlugin. To fix this I tried the following
Code:
(function($){
$.fn.myPlugin = function() {
// do something
} $.fn.myPlugin.prototype.test = function() {
var $this = $(this) ;
// do something ;
}})(jQuery) ;
but now the function 'test' is unknown.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved