Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
accessing elements with jquery
Old 12-20-2010, 09:31 PM accessing elements with jquery
Ultra Talker

Posts: 254
Trades: 0
i am using tiny mce editor to add content to pages, when i hit enter the editor automatically generates
<p>&nbsp;</p> or <p> </p>

i cannot change the settings of tiny mce so that i can change line breaks to be <br> instead of <p>&nbsp;</p> or <p> </p>

in my css i have given the following
.content p{
margin: 0 0 8px 0;
line-height: 18px;
}

so that the content which is within p tags will get the line height and margins between paragraphs that have the content

because of the empty <p>&nbsp;</p> that the editor is generating both the line height and margin bottom are being applied to <p>&nbsp;</p> and there is a big vertical gaps being created

is it possible using jquery to find <p>&nbsp;</p> or <p> </p> so that a new css rule can be set so that these empty p tags will have no line height and very less margin example
$(document).ready(function(){
$("find empty p").css("line-height","0");
$("find empty p").css("margin-bottom","2px");
});
sudhakararaog is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-20-2010, 10:15 PM Re: accessing elements with jquery
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
In tinyMCE, to make a <br>, hold "shift" and press "enter".
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 12-20-2010, 10:34 PM Re: accessing elements with jquery
Ultra Talker

Posts: 254
Trades: 0
thanks
sudhakararaog is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to accessing elements with jquery
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11663 seconds with 12 queries