Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible conflict #36

Closed
joneslafuente opened this issue Dec 17, 2015 · 3 comments
Closed

Possible conflict #36

joneslafuente opened this issue Dec 17, 2015 · 3 comments
Labels

Comments

@joneslafuente
Copy link

Hi

Using the callback function I have managed to integrate an accordion inside the gridder panel. Works very well. What I now want to be able do is use a jquery function that changes font attributes such as opentype features (kerning) etc. Inside gridder it isn't working but is if I place it outside.

Is there anything I need to be doing re. callback. Does it need to be inside a callback function within the accordion which is in itself inside the gridder callback. Apologies but I am not a programmer but am helping out a colleague and this is pushing my knowledge rather a bit. At least I am learning something.

Many thanks

Brian

@orion3dgames
Copy link
Owner

Hello. Now worries, let see if I can help you.

The reason for this is because the content get created dynamically in the dom so jQuery does not know what to do.

Any plugins you wanna launch in the gridder needs to be launch with the onContent callback like this:

$(".gridder").gridderExpander({
    onContent: function(){
        console.log("Gridder Content Loaded");
        $(".carousel").carousel();
     }
});

In the case you are trying to attach a jquery click event on a button inside the gridder content, you can also use the on delegation function, it will then create a listener than will trigger whenever the button is added to the dom.

$(".gridder-show").on('click', '.myButtonInsideTheGridderContent', function(){
    console.log('Hello World.');
});

@joneslafuente
Copy link
Author

Hi, Thanks, works perfectly for a button, just need to work out how to use it for drop down menus (select) that then change the css immediately. Have used a change function but not sure if that is what I need. Ideally a select menu with 4 options, each changing the css of a piece of text.

Thanks again

Brian

@orion3dgames
Copy link
Owner

If you are trying to do some sort of text editor, why not use a pre-existant one? like this one: http://alex-d.github.io/Trumbowyg/ ??

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

No branches or pull requests

2 participants