Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.

Modifying cluetip default option #137

Open
an2d opened this issue Feb 26, 2014 · 0 comments
Open

Modifying cluetip default option #137

an2d opened this issue Feb 26, 2014 · 0 comments

Comments

@an2d
Copy link

an2d commented Feb 26, 2014

This is a support case instead of a bug report.

I want to display the wait image when the cluetip is being loaded (triggered by a simple click in my case). However, when the element is being dragged (instead of simply being clicked), I do not want to show the cluetip at all (including the wait image). I have managed to not show the cluetip when that happens (I know when the element is being dragged) but I can't seem to hide the wait image.

Is there a way to do either of the following

  1. Change the default cluetip option (from waitImage: true to waitImage: false - in my case in beforeSend in ajaxSettings OR
  2. pass in the boolean to jquery-cluetip.js (so I can read it in the jquery-cluetip.js)
        $(this).cluetip({
            showTitle: false,
            cluetipClass: 'rounded',
            width:440,
            tracking: true,
            waitImage: true,
            activation: 'click',
            ajaxSettings: {
                type: "GET",
                beforeSend: function(){
                    if(dragged == true) {
                        *opts*.waitImage = false; //doesn't compile but shows the intended behaviour)
                    }
                }
            },
            ajaxProcess: function(data){
                return data;
            }
        });

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant