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

Customise html output #33

Closed
ghost opened this issue Mar 16, 2015 · 5 comments
Closed

Customise html output #33

ghost opened this issue Mar 16, 2015 · 5 comments

Comments

@ghost
Copy link

ghost commented Mar 16, 2015

Hi there,

Thanks for this, it's a real time saver.

Is there a way I can customise the HTML output of a tweet? For example access the inner content of p.timePosted independently of the rest of the tweet?

At present trying to parse the string returned with jQuery but it's getting a little messy, plus not working to boot!

Cheers

@jasonmayes
Copy link
Owner

Currently the only way to do this is like the advanced example where it returns to you the tweets which you can then manipulate as required.

You might be able to make your life easier by simply creating a new variable which is say a DIV eg:

var temp = document.createElement('div');

And then inject the returned HTML:

temp.innerHTML = tweets[n];

You can then use regular jquery functions on temp variable as it is just a HTMLElement which has not yet been added to the DOM - but all the functions etc are there for to you to use eg querySelector / getElementById etc...

@ghost
Copy link
Author

ghost commented Mar 17, 2015

Thanks very much! As soon as your site's back online I'll be sure to put a pint behind the bar for you.

@jasonmayes
Copy link
Owner

@gdharding Wow, I did not realise my site was down. Should be back up now! Seems my server got restarted by host. Thanks for letting me know.

@ghost
Copy link
Author

ghost commented Mar 18, 2015

No probs!

@jasonmayes
Copy link
Owner

@gdharding PS Thank you for the beer! Most kind of you.

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

No branches or pull requests

1 participant